BP child theme causes profile cover image to disappear
-
Hello, I’m working on a buddypress site, and I finally figured out how to create a child theme and a css file that I can use to customize the way my buddypress looks. I was so excited, I almost didn’t notice that my profile header went missing. After some debugging, I realized that simply copying over the bp-legacy css file into my child theme css folder is what caused the header to disappear.
I’ve looked through old answers to try and solve the problem on my own, however, I don’t understand the code itself, how it works or even where it’s supposed to go.
topic where I got the code -> CSS causing cover image to disappear.
The code suggested –
function your_theme_cover_image_css( $settings = array() ) { /** * If you are using a child theme, use bp-child-css * as the theme handel */ $theme_handle = 'bp-parent-css'; $settings['theme_handle'] = $theme_handle; /** * Then you'll probably also need to use your own callback function * @see the previous snippet */ $settings['callback'] = 'bp_legacy_theme_cover_image'; return $settings; } add_filter( 'bp_before_xprofile_cover_image_settings_parse_args', 'your_theme_cover_image_css', 10, 1 ); add_filter( 'bp_before_groups_cover_image_settings_parse_args', 'your_theme_cover_image_css', 10, 1 );
Is this code up to date? Where is it even supposed to go? I tried placing it in my parent theme’s functions.php file. Am I supposed to have a functions.php file in my child theme?
Also, in case it’s important, I’m currently using the GeneratePress free theme, but I’m likely not going to stay with it. This is currently just for testing purposes.
- You must be logged in to reply to this topic.