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.

Setup profil cover image

This topic is resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Joss
    Participant
    • 34 Topics
    • 85 Posts
    @joss

    Hi,

    Do you have a code to setup same cover image for all member page ?

    Thanks,
    Joss

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

    Hi @joss,

    Here is a PHP code snippet that should allow you to change the default cover image on member profiles:

    add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'gwangi_change_default_member_cover', 20, 1 );
    
    if ( !function_exists('gwangi_change_default_member_cover') ) {
    	function gwangi_change_default_member_cover( $settings = array() ) {
    		$settings['default_cover'] = 'your_image_url';
    		return $settings;
    	}
    }

    Don’t forget to change ‘your_image_url’ by your own image url in the snippet.

    If you need to find out how to add a PHP code snippet to your site, we recommend that you visit this article of our documentation:

    Adding Custom PHP Without Changing Your Child Theme

    Best regards,

    Joss
    Participant
    • 34 Topics
    • 85 Posts
    @joss

    Hi,

    Your code don’t work in my configuration…

    Do you know if it’s possible to assign a different cover image to different member type ?

    Regards,
    Joss

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

    Hi @joss,

    I did a quick check on your website and noticed that the “Cover Image Uploads” option in BuddyPress (in Settings > BuddyPress > Options) was disabled, which is why the cover image was not showing (the option is called “En tête de profil” in french). I enabled that option, if you go on a profile page you can see that your cover image is now showing correctly.

    It is possible to assign a different cover image per member type by modifying the snippet that I previously gave you. Here’s a starting point:

    add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'gwangi_change_default_member_cover', 20, 1 );
    
    if ( !function_exists('gwangi_change_default_member_cover') ) {
    	function gwangi_change_default_member_cover( $settings = array() ) {
    	  $user_id = bp_displayed_user_id();
    	  $member_type = bp_get_member_type( $user_id );
    	  
    	  $settings['default_cover'] = 'default_cover_image_url';
    	  
    	  switch( $member_type ) {
    		case 'teacher':
    		  $settings['default_cover'] = 'student_cover_image_url';
    		  break;
    		case 'student':
    		  $settings['default_cover'] = 'teacher_cover_image_url';
    		  break;
    	  }
    	  
    		return $settings;
    	}
    }

    In that snippet you would need to change ‘teacher’ and ‘student’ by your member types and put your own cover image urls (you can also add more types if needed).

    If you’re not comfortable with editing PHP code however, please note that we unfortunately cannot help much more than this as that kind of custom development is out of the support we can provide.

    But of course if you need some custom development work, you can always require the services from Envato Studio freelancers (https://studio.envato.com/explore/websites-programming). This web platform gives you access to developers who have already experience with theme customizations, and for very competitive prices.

    Hope this helps you in your website setup.

    Best regards,

    Joss
    Participant
    • 34 Topics
    • 85 Posts
    @joss

    Thanks Themosaurus for your great support 🙂

    Joss
    Participant
    • 34 Topics
    • 85 Posts
    @joss

    Another question with cover image :

    Is it possible to modify your color gradient by member type.
    Maybe add this function to the code you gave me above…

    Thanks,
    Joss

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

    Hi @joss,

    No need for a PHP snippet for that, you can do so with a simple CSS snippet 🙂

    .member-type-x.buddypress.bp-user:not(.activity-permalink) .entry-content > #buddypress:after {
    	background-image: linear-gradient(15deg, #F26E93 50%, rgba(255,255,255,0) 100%);
    }

    Don’t forget to change the “x” in “member-type-x” by your member type and the gradient color “#F26E93” by the color of your choice. Then duplicate this snippet for all your member types.

    If you need to find out how to add custom CSS to your site, we recommend that you visit this article of our documentation:

    Adding Custom CSS

    Regards,

Roboraptor 🦖
Themosaurus Topic Closer

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

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

The topic ‘Setup profil cover image’ 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