Skip to:
Content
Pages
Categories
Search
Top
Bottom

remove “view” link in nav menu


  • giilour
    Participant

    @giilour

    I want to be able to remove the “view” link in nav menu for subscribers or get rid of all menu items for subscribers.

    I have been able to get rid of some of the menu items with

    function bpview_hide_top_nav() {
    if( bp_is_active(‘xprofile’ ) )
    if( bp_loggedin_user_id() == bp_displayed_user_id() ) {
    bp_core_remove_nav_item( ‘profile’ );
    bp_core_remove_nav_item( ‘view’ );
    }
    }
    add_action( ‘bp_ready’, ‘bpview_hide_top_nav’ );

Viewing 1 replies (of 1 total)

  • giilour
    Participant

    @giilour

    I ended up using this for

    function bpfr_profile_menu_tab_pos(){
    global $bp;

    if ( !bp_is_home()) {
    $bp->bp_nav[‘activity’][‘position’] = 30;
    $bp->bp_nav[‘forums’][‘position’] = 50;
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘location’] = false;
    $bp->bp_nav[‘notifications’][‘position’] = 40;
    $bp->bp_nav[‘friends’][‘position’] = 20;
    $bp->bp_nav[‘groups’][‘position’] = 60;
    $bp->bp_nav[‘activity’] = false;
    }
    }
    add_action(‘bp_setup_nav’, ‘bpfr_profile_menu_tab_pos’, 100);

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar