Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress menu – show tab not only to user


  • bertl11
    Participant

    @bertl11

    Hello,

    I added a new tab to the menu. I use the following code in bp-custom.php
    Now this tab can only be seen by the user and is not public. How can I set this tab to be seen from everyone?

    Thanks for your help

    function bpfr_menubar_link() {
    global $bp;

    $bp->bp_nav[$slug] = array(
    ‘name’ => ‘Fotos, Videos’,
    ‘slug’ => ‘super_link’,
    ‘link’ => ‘http://…..’,
    ‘css_id’ => ‘super-link’,
    ‘position’ => 30
    );
    }
    add_action( ‘bp_core_new_nav_item’, ‘bpfr_menubar_link’, 999 );

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

  • SuitePlugins
    Participant

    @suiteplugins

    You can add the following to your array

    ‘show_for_displayed_user’ => bp_core_can_edit_settings(),


    shanebp
    Moderator

    @shanebp

    Please use the code button when posting code.

    show_for_displayed_user should default to true.
    You might try manually setting it to true.
    'show_for_displayed_user' => true,


    bertl11
    Participant

    @bertl11

    Hello and thanks for your help!! It worked!
    And sorry for not using the code button.

    I have another question and perhaps you know how to solve this:

    In the menu there is the profile and the settings tab. I want the settings tab to be a sub tab of the profle tab. Do you know how to do this?

    Thanks for your help

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