Archived topic
Buddypress groups home page conflict
5 replies · Started by Jeffrey on July 28, 2020
I am having a conflict with the home page header element showing up on the buddypress groups home page. Tried a number of options including excluding it from the pages to display on. No luck.
Any idea on how to stop the "font page" header element from showing up on the buddypress groups home page?
Hi there,
I think we would need a solution like this:
https://generatepress.com/forums/topic/bbpress-forum-root-not-taking-into-account-elements/#post-667950
Try replacing 10 with the actual ID of the header element and replace true with false.
Unfortunately that didn't do it...
Do i replace 10 with the header element ID in both places? Tried both anyway :)
Sorry the solution was for bbPress and not BuddyPress.
Can you try this instead?
add_filter( 'generate_header_element_display', function( $display, $element_id ) {
if ( 10 === $element_id ) {
if ( function_exists( 'is_buddypress' ) && is_buddypress() ) {
return false;
}
}
return $display;
}, 10, 2 );
Replace the first 10 only.
Perfect!!!
Glad to hear :)