BuddyDev

Custom Default BuddyPress User Profile cover photo based on WordPress Roles

One of our members asked me recently about this. They wanted to know if it was feasible to set different default BuddyPress profile cover image based on WordPress user roles. If you are looking for the same, you can do it easily with the following code

You put the above code in your bp-custom.php or the functions.php in your theme.

I have used capability here for determining user roles, You may look at the WordPress roles in more details here.

4 Responses to Custom Default BuddyPress User Profile cover photo based on WordPress Roles

  • Just wanted to say Thanks for directing me to the right direction to set up a default cover image for those who haven’t uploaded cover images.

  • Thank you Pradeep 🙂

  • Hi there, I am looking for the same but not for the profile photo but rather the cover photo i.e. the large, wide photo in the profile section.
    Do you know how to set default images based on profiles for the cover photo?

    Thanks!!

    • Hi Rafaela,
      The above code is for the cover photo. It is exactly what you are looking for.

      Regards
      Brajesh

Leave a Reply

Are you looking for support?

Please ask support questions in BuddyDev Forum and help us serve you better. Please use comment for general discussion/feature suggestions.

Your email address will not be published. All the fields marked as * are required.

If you are posting code, please use <pre> { Your Code Block } </pre>. Example:- <pre> echo $name; </pre>

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">


Subscribe