hide profile tabs
-
Hello, I want to hide the profile navigation tab on a specific profile role and for that, I’m using code:
function bpcodex_remove_member_tab_on_role() { $user = get_userdata( bp_displayed_user_id() ); if ( ! in_array( 'contributor', (array) $user->roles ) ) { return; } // not logged in user won't see these tabs if ( !is_user_logged_in() ) { bp_core_remove_nav_item( 'contact-me' ); } } add_action( 'bp_actions', 'bpcodex_remove_member_tab_on_role' );
This code hide the (contact form) tab fine, but then I can’t access (I’m getting 404 error) other created forms “Post Submissions” on the specified profile “contributor”.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘hide profile tabs’ is closed to new replies.