Skip to:
Content
Pages
Categories
Search
Top
Bottom

Move Favorites (& Mentions) subnav tab from Activity to Notifcations tab


  • @mcuk
    Participant

    @mcuk

    Hi all,

    I’m trying to move the Favorites subnav tab and associated page so it appears instead underneath the Notifications nav tab. I don’t want to change what appears on the page by default, purely just move its location. I’m familiar with creating/removing new nav/subnav tabs but am unable to find the correct function to make the page appear as it does by default when its under the Activity nav tab.

    (I also want to do the same with the Mentions subnav tab/page).

    I’ve looked around for a good long while in the forums and the Buddypress files but am not making any headway apart from what I’ve pasted below. Am I calling the correct screen function & link?

    Code I have in my bp_custom.php is:

    <?php
    // Add a new subnav menu tab for Fave under Notifications tab
    function fave_subnav_tab() {
    global $bp;
    $parent_slug = ‘notifications’;

    //Add subnav item
    bp_core_new_subnav_item( array(
    ‘name’ => __( ‘Fave’ ),
    ‘slug’ => fave,
    ‘parent_url’ => $bp->loggedin_user->domain . $parent_slug.’/’,
    ‘parent_slug’ => $parent_slug,
    ‘screen_function’ => ‘bp_activity_screen_favorites’,
    ‘position’ => 30,
    ‘link’ => bp_activity_screen_favorites(),

    ) );
    }

    add_action( ‘bp_setup_nav’, ‘fave_subnav_tab’ );
    ?>

    WP Version: 4.1.1
    BP Version 2.2.2.1

    Thank you for any assistance!

Viewing 1 replies (of 1 total)

  • @mcuk
    Participant

    @mcuk

    Hi all,

    I’m still looking for the correct screen function to mimic/copy the existing favorites page and the method by which to load it. All I want to do is duplicate that page somewhere else.

    The above code works to setup the new subnav tab but I can’t get any page content (ignore the link array item, that is obviously wrong).

    Is the approach below the method by which to load a standard buddypress template to a subnav tab or is that just for custom screen functions? :

    https://buddypress.org/support/topic/custom-profile-menu/

Viewing 1 replies (of 1 total)
  • The topic ‘Move Favorites (& Mentions) subnav tab from Activity to Notifcations tab’ is closed to new replies.
Skip to toolbar