You need to first look in your web server’s PHP error log, and see what it says.
Thanks for the response Paul. The php error log says the following
stderr: PHP Fatal error: Call to undefined function bp_core_new_nav_item ()
This of course means the function can’t be found. What do I need to do for the buddypress function to be recognized? Thanks again!
That error is due to the missing $bp global.
>So I’m trying to add a new navigation under the “my profile” tab
Do you mean in the admin bar at the top?
Or on profile pages under ‘Profile’ in the ‘Activity Profile Messages’ etc nav ?
if it’s the latter, you want to a subnav item, not a nav item.
Try this (which assumes you don’t know about the other functions needed) :
`
add_action( ‘bp_setup_nav’, ‘add_feedback_subnav_tab’, 100 );
function add_feedback_subnav_tab() {
global $bp;
bp_core_new_subnav_item( array(
‘name’ => ‘Feedback’,
‘slug’ => ‘feedback’,
‘parent_url’ => trailingslashit( bp_loggedin_user_domain() . ‘profile’ ),
‘parent_slug’ => ‘profile’,
‘screen_function’ => ‘profile_screen_feedback’,
‘position’ => 50
)
);
}
// show feedback when ‘Feedback’ tab is clicked
function profile_screen_feedback() {
add_action( ‘bp_template_content’, ‘profile_screen_feedback_show’ );
bp_core_load_template( apply_filters( ‘bp_core_template_plugin’, ‘members/single/plugins’ ) );
}
function profile_screen_feedback_show() {
echo “Feedback Screen”;
// call your feedback template
//locate_template( array( ‘feedback-profile.php’ ), true );
}
`