Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove “forums” from buddypress navigation menu


  • mspiggie
    Participant

    @mspiggie

    How to remove “forums” from buddypress navigation menu

    Can someone please provide step-by=step instructions as I am new to wordpress and buddypress thanks

Viewing 2 replies - 1 through 2 (of 2 total)

  • Venutius
    Moderator

    @venutius

    Hi, do you mean from the users profile tabs?


    Venutius
    Moderator

    @venutius

    Here’s how to remove forums from all users profile tabs and toolbar menu, this code would need to go in your child-themes functions.php:

    function venutius_remove_forums_on_usermenu() {
    global $wp_admin_bar;
    
    	if ( bp_use_wp_admin_bar() ) {
    		$wp_admin_bar->remove_node( 'my-account-forums' );
    	}
    
    }
    add_action( 'wp_before_admin_bar_render', 'venutius_remove_forums_on_usermenu' );
    
    function venutius_remove_profile_forums_tab() {
    
    	bp_core_remove_nav_item( 'forums' );
    
    }
    add_action( 'bp_actions', 'venutius_remove_profile_forums_tab' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar