Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add Order By Drop Down to SubNac of Custom Profile Page


  • knowitallninja
    Participant

    @knowitallninja

    Hi,

    I have created a custom page with a single subnav item using the code below:

    function profile_tab_achievements() {
          global $bp;
     
          bp_core_new_nav_item( array( 
            'name' => 'Achievements', 
            'slug' => 'achievements', 
            'screen_function' => 'achievements_screen', 
            'position' => 100,
            'parent_url'      => bp_loggedin_user_domain() . '/achievements/',
            'parent_slug'     => $bp->profile->slug,
            'default_subnav_slug' => 'awards'
          ) );
      
    }
    add_action( 'bp_setup_nav', 'profile_tab_achievements' );
    
    function profile_subnav_awards() {
      bp_core_new_subnav_item( array( 
            'name' => 'Awards',
            'slug' => 'awards',
            'parent_url' => bp_loggedin_user_domain() . '/achievements/',
            'parent_slug' => 'achievements',
            'screen_function' => 'achievements_screen'
      ) );
    }
    add_action( 'bp_setup_nav', 'profile_subnav_awards' );

    I would like the subnav of this page to have a Order By Dropdown, much like exists in the groups & notification pages. I cannot find any guide on how to add this to the subnav menu though. Can anyone help? I mean just to add the drop down. I think I can probably figure out the sorting myself once I have the dropdown added.

  • You must be logged in to reply to this topic.
Skip to toolbar