Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Admin toolbar: disable buddypress section

  • @robertosalemi

    Participant

    Wordpress 4.0
    buddyPress 2.1.1

    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 3 replies - 1 through 3 (of 3 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! 😉

    @robertosalemi

    Participant

    No,
    it’s not a correct way, because if I enable this action, I don’t show the image in media section!

    Why?

    Thanks! 😉

    @robertosalemi

    Participant

    Resolved (this time for good!):

    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');

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Admin toolbar: disable buddypress section’ is closed to new replies.
Skip to toolbar