Thanks again for the advice, when I switch to “members/single/plugins” it just lists all the members. There’s none of the content I set, or the profile page.
It’s just a long list of the members registered with the site.
Thanks for that! It’s doing something different now, but not what I need unfortunately.
What is happening now is that the Title and Content are the only thing on the page, there is no other content… not my page header, not the Buddypress profile page, nothing at all.
Here’s the new code.
function profile_tab_favourites() {
global $bp;
bp_core_new_nav_item( array(
'name' => 'Favourites',
'slug' => 'favourites',
'screen_function' => 'favourites_screen',
'position' => 40,
) );
}
add_action( 'bp_setup_nav', 'profile_tab_favourites' );
function favourites_screen() {
//add title and content here - last is to call the members plugin.php template
add_action( 'bp_template_title', 'favourites_title' );
add_action( 'bp_template_content', 'favourites_content' );
bp_core_load_template( 'buddypress/members/single/plugins' );
}
function favourites_title() {
echo 'Title';
}
function favourites_content() {
echo 'Content';
}
-NOTE: my buddypress templates are all inside a directory called “buddypress” on root, hence the “buddypress/members/single/plugins” not “members/single/plugins”.