BuddyBoss Home – Web Support Forums Themes BuddyBoss theme Transfer User Profile Header Image from image header plugin i was using to theme

  • This topic has 12 replies, 2 contibutors, and was last updated 9 years ago by Anonymous.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Question

    #52111
    @karlos

    Hello,

    I see the new theme update has a header image, I think is great!
    I don’t need to use an extra plugin for this anymore!

    However, the members have a header image already with the image header plugin i was using. it stores the image url in a user meta field called “cover”. How could I transfer the image so the users retain their cover image? ?

    Thank you for your help

    Answers

    #52314

    Anonymous
    @

    Hi @karlos, it is little bit typical to use user-meta values for cover,
    BuddyPress is using attachment api to manage cover images.

    check these codes

    
    function buddyboss_cover_image_callback( $params = array()) {
    $default_cover = get_stylesheet_directory_uri().'/images/default-bp-cover-image.jpg';
    $cover_image = ( !$params['cover_image'] ) ?  'background-image: url(' . $default_cover . ');' : 'background-image: url(' .         $params['cover_image'] . ');';
    
    	return '
    		/* Screen reader - this should be added to the buddypress css of the theme */
    
    		#buddypress #header-cover-image {
    			height: 180px;
    			' . $cover_image . '
    		}
    	';
    }
    
    

    We have used a default cover image, you can use it fall back cover image using your displayed user id user meta

    Regards
    Varun Dubey

    #52383
    @karlos

    Hello,

    How do I use that code? Do I place it as-is in functions.php?

    I did and it breaks the user profile page.

    Please advise,

    #52389

    Anonymous
    @

    Hi @karlos we have already added these codes in theme-functions.php of parent theme and If you add it again to child theme it will break the site due to duplicate function call.
    if you need cover image from your custom user meta, you will need to edit the same function inside the parent theme.
    I will suggest to skip it, and let you user to set their new cover images
    Regards
    Varun Dubey

    #52397
    @karlos

    I understand.

    What is the function that inserts the cover when user uploads it?
    I might be able to do it programmatically for all users already with covers.
    There are about 300 users

    Thanks

    #52400
    @karlos

    Also where do I translate to spanish the tab “change cover image”?

    #52539

    Anonymous
    @

    It’s part of BuddyPress string.
    Regards
    Varun Dubey

    #52607
    @karlos

    When I open buddypress-es_ES I dont find it there. Is there another way to localize buddypress?

    #52731

    Anonymous
    @

    Hi @karlos, sync it will BuddyPress pot file using Poedit
    Regards
    Varun Dubey

    #52737
    @karlos

    I already have a buddypress-es_ES file. I sych it with what?

    #52741

    Anonymous
    @

    Hi @karlos, from fresh BuddyPress plugin download you can get BuddyPress pot file
    https://poedit.net/news/announcing-1-8
    Regards
    Varun Dubey

    #52759
    @karlos

    That worked.

    Thank you!

    #53045

    Anonymous
    @

    🙂 Great. I will close this topic , Feel free to create new for any further queries.
    Regards
    Varun Dubey

Viewing 13 posts - 1 through 13 (of 13 total)
  • The question ‘Transfer User Profile Header Image from image header plugin i was using to theme’ is closed to new replies.