-
Author
-
December 14, 2013 at 15:37 #8264mpitkaParticipant
Hi!
I would like to remove profile menu. I mean that this menu should not be visible to any visitor. Only profile owner can see it.
Look attached picture 🙂
https://www.dropbox.com/s/e11z2tm5ps5syub/profilemenu.png
I appreciate your help!
December 14, 2013 at 17:59 #8273adamParticipantthis thread will help you:
https://archived.seventhqueen.com/forums/topic/disable-profile-tab-below-profile-imagethis is my full code in my child theme’s functions.php file, which might help you too:
COPY CODEfunction my_remove_profile_nav() { global $bp; if (!bp_is_my_profile()) { bp_core_remove_nav_item( 'profile' ); bp_core_remove_nav_item( 'groups' ); bp_core_remove_nav_item( 'friends' ); bp_core_remove_nav_item( 'forums' ); bp_core_remove_nav_item( 'events' ); bp_core_remove_nav_item( 'location' ); bp_core_remove_nav_item( 'settings' ); bp_core_remove_nav_item( 'bp_album_setup_nav' ); } } add_action( 'bp_setup_nav', 'my_remove_profile_nav' ); function my_setup_nav() { global $bp; $bp->bp_nav['activity'] = false; $bp->bp_nav['profile']['name'] = 'Edit Profile'; } add_action( 'bp_setup_nav', 'my_setup_nav' ); function my_remove_album_nav() { if (!bp_is_my_profile()) { remove_action( 'bp_setup_nav', 'bp_album_setup_nav' ); } } add_action( 'bp_setup_nav', 'my_remove_album_nav', 9 );
you can customize it to suit your needs.
December 15, 2013 at 17:37 #8294mpitkaParticipantI don’t want any tabs to be visible, but the content of “profile” tab must be visible. If removing all tabs, it will give 404-error or everything is invinsible. Correct me, if I’m wrong?
December 15, 2013 at 17:58 #8296adamParticipantwell if you use the code above it will remove all of the menu items, but you won’t get a 404-error. all of the profile information will remain in the blue section. on your own profile, you’ll still see the navigational menu below the blue section.
December 15, 2013 at 20:08 #8298mpitkaParticipantBut I want to all these extended informations to be shown too for every profile. I just dont want useless menu which has only one tab.
December 15, 2013 at 21:53 #8300adamParticipantoh i see. you want to keep the information below the navigational menu, but get rid of the menu itself. sorry, not sure how to do that. i will let seventhqueen respond.
December 16, 2013 at 11:21 #8327AbeKeymasterSee this css from the topic: https://archived.seventhqueen.com/forums/topic/missing-groups-nav
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 16, 2013 at 11:49 #8330mpitkaParticipantthis removes whole menu and no information is shown.
December 17, 2013 at 00:31 #8404AbeKeymasteryou are right,
this is the updated code:
body:not(.my-account):not(.groups) #item-nav {
display: none;
}Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 17, 2013 at 13:40 #8435mpitkaParticipantNow it works perfectly! I’m so happy 🙂 Thank you Abe!
December 17, 2013 at 21:42 #8453AbeKeymasterYou are welcome 😉
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.