Archived topic
remove top bar from buddypress
3 replies · Started by Jeffrey on August 4, 2020
ok i found this code and edited it.. how can i get it to also apply to all the buddypress profile and account pages. Like the ones that are autogenerated. I can't seem to find the right tags?
basically all the pages under /members/'username'/"user_generated_page/
example: /members/'username'/messages/
add_action( 'wp', 'db_disable_topbar' );
function db_disable_topbar() {
if ( is_singular( 'product' ) || is_page( array( 522 ) ) ) {
remove_action( 'generate_before_header','generate_top_bar', 5 );
}
}
Hi there,
theres the wide scope is_buddypress() template tag.
See here for more:
https://codex.buddypress.org/developer/template-tag-reference/
Perfect!
You're welcome