What’s the screen function for the buddypress profile front page?
-
I’m trying to set up paging for the budddypress profile page. On the font page I display a loop of posts and the only way I found to paginate was to add “page” as a subnav like this.
` if ( (int) bp_posts_cur_page() > 0) {
bp_core_new_subnav_item( array(
‘name’ => ‘Page ‘. bp_posts_cur_page(),
‘slug’ => ‘page’,
‘parent_slug’ => $bp->slug,
‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/’,
‘screen_function’ => ‘bp_core_catch_profile_uri’,
‘position’ => 20,
) );
bp_core_new_subnav_item( array(
‘name’ => ‘Page ‘.bp_posts_cur_page(),
‘slug’ => bp_posts_cur_page(),
‘parent_slug’ => $bp->slug . ‘/page’,
‘parent_url’ => $bp->loggedin_user->domain . $bp->slug . ‘/page/’,
‘screen_function’ => ‘bp_core_catch_profile_uri’,
‘position’ => 20,
) );
}`Now I left out a few important parts that makes that work but it’s just to understand what I’m doing. I just need the correct screen function for the top level of the profile so that mysite.com/exampleuser/page is pointing at the same screen as mysite.com/exampleuser/. Any idea?
- The topic ‘What’s the screen function for the buddypress profile front page?’ is closed to new replies.