Skip to:
Content
Pages
Categories
Search
Top
Bottom

Set up a new default submenu in activity menu


  • giannis4
    Participant

    @giannis4

    Hello,

    I am trying to set up ‘following’ as the default submenu activity for the Activity stream. While I manage to do it using the following code:

    function set_up_default_submenu() {
    bp_core_new_nav_default([
            'parent_slug'       => 'activity',
            'screen_function'   => 'bp_activity_screen_my_activity',
            'subnav_slug'       => 'following',
        ]);
    }
    add_action( 'bp_setup_nav', 'set_up_default_submenu', 12 );

    The issue is that the submenu links have a problem. The previous default submenu still points to /members/username/activity/ and not to /members/username/activity/just-me/ as it now should. This causes a mixup problem between the new and previous default subnav. Any ideas?

Viewing 1 replies (of 1 total)

  • giannis4
    Participant

    @giannis4

    I found out that the Group component class gives you the opportunity to override the default ‘home’ subnav either by using the BP_GROUPS_DEFAULT_EXTENSION constant or by using the bp_groups_default_extension filter.

    I could not find anything like this for the Activity component.

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