Skip to:
Content
Pages
Categories
Search
Top
Bottom

Admin toolbar: disable bbpress section


  • robertosalemi
    Participant

    @robertosalemi

    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

    @robertosalemi

    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

    @robin-w

    thanks for posting your solution


    robertosalemi
    Participant

    @robertosalemi

    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

    @robkk

    @robertosalemi

    if you still have an issue contact BuddyPress support

    https://buddypress.org/support/


    robertosalemi
    Participant

    @robertosalemi

    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

    @robin-w

    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