Adding New Profile Tab Content
-
Hello!
I’m having trouble with getting my content to work when adding a new tab to the profile page. Here’s my code:
function profile_tab_favourites() { global $bp; bp_core_new_nav_item( array( 'name' => __( 'Favourites' ), 'slug' => 'favorites', 'screen_function' => 'favourites_screen', 'position' => 40 ) ); 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( apply_filters( 'bp_core_template_plugin', 'buddypress/members/single/plugins' ) ); } function favourites_title() { echo 'Title'; } function favourites_content() { echo 'Content'; } } add_action( 'bp_setup_nav', 'profile_tab_favourites' );
Adding the tab works great, but my screen function doesn’t work at all. infact, when I click on my tab I just get 404’d and there’s no content echoing at all.
I have searched and searched for an answer everywhere and I can’t find anyway to figure this out. I would love some advice.
If you need me to supply anything, just let me know!
Thanks!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Adding New Profile Tab Content’ is closed to new replies.