Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Set default BuddyPress Cover Images for groups

This topic is resolved
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    I used the BP codex, but did not apply:

    function your_theme_xprofile_cover_image( $settings = array() ) {
        $settings['default_cover'] = 'https://www.gymr.com.au/wp-content/uploads/2018/11/41a4fa77-d87c-4e32-bcdc-14badfad6a33.jpg';
     
        return $settings;
    }
    add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'your_theme_xprofile_cover_image', 10, 1 );

    Then used this, also failed:

    // Default group cover image
    function custom_default_group_cover_image( $settings = array() ) {
        $settings['default_cover'] = 'https://www.gymr.com.au/wp-content/uploads/2018/11/41a4fa77-d87c-4e32-bcdc-14badfad6a33.jpg'; // path to your image
     
        return $settings;
    }
    add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'custom_default_group_cover_image', 10, 1 );
    

    Please suggest if something should be otherwise.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @abourne,

    These snippets are correct. It’s just the priority of the filters that must be adjusted (10 -> 20, already done in your snippets).

    Regards,

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    Ta da, easy fix. Thanks.

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    Why is this not working? I set priority from 10, to 20 and then 30 – none worked…

    function bb_cover_image( $settings = array() ) {
        $settings['width']  = 949;
        $settings['height'] = 712;
     
        return $settings;
    }
    add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'bb_cover_image', 10, 1 );
    

    My default image are these exact dimensions.

    When deactivating code or activating it – no changes are made to image size on groups – hence not working properly.

    Thanks again.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @abourne,

    How do you want your cover image to be displayed? Do you want it to be fully visible?

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    Correct, to not be cut off by the page elements and to be displaying in full height.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @abourne,

    Here is a CSS snippet that will display your cover image in full:

    @media (min-width: 1200px) {
    	#buddypress div#item-header #header-cover-image {
    		height: 840px !important;
    		background-position: center center;
    	}
    	#buddypress div#item-header #profile-header {
    		height: 600px !important;
    	}
    }

    Regards

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    Applied this. It makes the dimensions of every cover photo placement container from any group push way lower down screen – hence cutting off cover pic and group info which makes the user need to scroll a little.

    The intent is not to change the layout of cover image size on all groups, rather just make this particular image as a default fit into the
    exact dimensions of the existing cover image placement container.

    Should it be best to just resize this image? I tried forever in paint – random dimensions to get it to fit. Failed.

    [‘width’] = 949;
    [‘height’] = 712;
    Is the original size of image

    What should this image be resized too in order to fit within the existing position/placement/container of cover images.

    Or should the above CSS be altered?

    Regards

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @abourne,

    To get your default image to fit, you would indeed need to resize it. Your image needs to have the same (or similar) ratio as the cover container. For instance, the default cover size on our demo is 1800 x 500, so you should try to resize your image to fit these dimensions or have the same or similar ratio.

    I hope this information will help.

    Regards

    alex
    Participant
    • 81 Topics
    • 259 Posts
    @abourne

    Okie dokie. Thanks for the support 🙂

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    You’re welcome alex. ?

    Best regards,

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Set default BuddyPress Cover Images for groups’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site