Forum Replies Created
-
label[for=”send-to-input”]
{
display:none!important;
}YES!!!
Thank you so much for your help.i found out that it only work when i try to remove a core buddypress nav like ‘messages’ or ‘friends’. With a custom nav or subnav it doesn’t work. Any ideas why?
hi, thanks for pointing that out. it still doesn’t work. could you point me in a direction where the problem could be?
Hi, thank you for your message. The link shows solutions for the role a visitor has when on a profile page. I would like to remove a tab on a profile when the profile owner (bp_displayed_user_id) doesn’t have a certain role.
I think i am close but i could be miles off:(
Here is where i am but it doesnt work//Disable bookings subnav by role of the displayed user id. function remove_bookingtab_by_displayed_role() { // Get Current User Data. $user = get_userdata( bp_displayed_user_id() ); // Get Roles. $roles = (array) $user->roles; // exclamationmark means not in array i hope if (!in_array( 'translator', $roles ) ) { bp_core_remove_subnav_item( 'bookings','booking' ); } } add_action( 'bp_setup_nav', 'function remove_bookingtab_by_displayed_role', 15 );In reply to: print of echo bp_displayed_user_id in a shortcodeShane, after my three days it took you three minutes tops probably.
Thank you so much.