Skip to:
Content
Pages
Categories
Search
Top
Bottom

Admin toolbar: disable bbpress section

  • @robertosalemi

    Participant

    Wordpress 4.0
    bbPress 2.5.4

    Hi,
    in admin toolber, I would disable the section about buddyPress, I detected it by css code:
    ul#wp-admin-bar-my-account-buddypress.

    Can I hide it?

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • @robertosalemi

    Participant

    Resolved.

    function remove_buddypress_admin_bar_init() {
    	echo '<style type="text/css">
    		div#wp-toolbar > ul#wp-admin-bar-top-secondary > li#wp-admin-bar-my-account > div.ab-sub-wrapper > ul#wp-admin-bar-my-account-buddypress {
    			display: none !important;
    		}
    	</style>';
    }
    
    add_action( 'init', 'remove_buddypress_admin_bar_init' );

    Thanks! ๐Ÿ˜‰

    @robin-w

    Moderator

    thanks for posting your solution

    @robertosalemi

    Participant

    Itโ€™s not a correct way, because if I enable this action, I donโ€™t show the image in media section!

    Why?

    Thanks! ๐Ÿ˜‰

    @robkk

    Moderator

    @robertosalemi

    if you still have an issue contact BuddyPress support

    https://buddypress.org/support/

    @robertosalemi

    Participant

    Resolved.

    function admin_bar_remove_this(){
    	global $wp_admin_bar;
    	$wp_admin_bar->remove_node('my-account-buddypress');
    }
    add_action('wp_before_admin_bar_render','admin_bar_remove_this');

    I hope this code is useful for someone.

    @robin-w

    Moderator

    great – glad you’re fixed

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar