Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I delete item in Account Menu?

  • Profile photo of wcten
    wcten
    Participant

    @wcten

    I need to delete the item “Forums” in my Account Menu on the Admin Bar.

    I tried to look through the file bp-core-adminbar.php, but cannot find anything that I can do.

    Is there a way to put a function at bp-custom.php to remove the “Forums”?

    Thanks.

Viewing 1 replies (of 1 total)
  • Profile photo of David Cavins
    David Cavins
    Participant

    @dcavins

    I made changes to the WP Admin Bar by adding this snippet to my theme’s functions.php file:

    // Customize WP Toolbar
    function change_toolbar($wp_toolbar) {
    $wp_toolbar->remove_node('my-account-forums');
    }
    
    add_action('admin_bar_menu', 'change_toolbar', 999); 

    You can remove any individual li by getting the id of it (in your case the li has the id wp-admin-bar-my-account-forums) and dropping the prefix wp-admin-bar-. The part where you remove the prefix is odd and makes it kind of a secret, but it works. I got the original idea here: http://www.sitepoint.com/change-wordpress-33-toolbar/

Viewing 1 replies (of 1 total)
  • The topic ‘How do I delete item in Account Menu?’ is closed to new replies.
Skip to toolbar