BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › Transfer User Profile Header Image from image header plugin i was using to theme
Tagged: profile header image
- This topic has 12 replies, 2 contibutors, and was last updated 8 years, 11 months ago by Anonymous.
Question
November 18, 2015 at 4:05 pm #52111@karlosHello,
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
November 20, 2015 at 9:37 am #52314@
AnonymousHi @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 DubeyNovember 21, 2015 at 8:37 am #52383@karlosHello,
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,
November 21, 2015 at 11:02 am #52389@
AnonymousHi @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 DubeyNovember 21, 2015 at 11:38 am #52397@karlosI 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 usersThanks
November 21, 2015 at 12:15 pm #52400@karlosAlso where do I translate to spanish the tab “change cover image”?
November 23, 2015 at 11:01 am #52539@
AnonymousIt’s part of BuddyPress string.
Regards
Varun DubeyNovember 24, 2015 at 8:11 am #52607@karlosWhen I open buddypress-es_ES I dont find it there. Is there another way to localize buddypress?
November 25, 2015 at 10:57 am #52731@
AnonymousHi @karlos, sync it will BuddyPress pot file using Poedit
Regards
Varun DubeyNovember 25, 2015 at 11:10 am #52737@karlosI already have a buddypress-es_ES file. I sych it with what?
November 25, 2015 at 11:21 am #52741@
AnonymousHi @karlos, from fresh BuddyPress plugin download you can get BuddyPress pot file
https://poedit.net/news/announcing-1-8
Regards
Varun DubeyNovember 25, 2015 at 12:26 pm #52759@karlosThat worked.
Thank you!
November 29, 2015 at 1:24 am #53045@
Anonymous🙂 Great. I will close this topic , Feel free to create new for any further queries.
Regards
Varun Dubey
- The question ‘Transfer User Profile Header Image from image header plugin i was using to theme’ is closed to new replies.