Remove Forums tab from user BuddyPress profiles Function

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #156161
    Locohacker
    Administrator

    Remove Forums tab from user BuddyPress profiles Function

    // Remove Forums tab from user profiles
    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 1 post (of 1 total)
  • You must be logged in to reply to this topic.