This topic has 11 replies, 3 voices, and was last updated 10 years by Abe.

  • Author
  • #8264
     mpitka
    Participant

    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!

    #8273
     adam
    Participant

    this thread will help you:
    https://archived.seventhqueen.com/forums/topic/disable-profile-tab-below-profile-image

    this is my full code in my child theme’s functions.php file, which might help you too:

    COPY CODE
    
    function 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.

    #8294
     mpitka
    Participant

    I 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?

    #8296
     adam
    Participant

    well 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.

    #8298
     mpitka
    Participant

    But 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.

    #8300
     adam
    Participant

    oh 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.

    #8301
     mpitka
    Participant

    yes! Just that I mean 🙂

    #8327
     Abe
    Keymaster

    See 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.

    #8330
     mpitka
    Participant

    this removes whole menu and no information is shown.

    #8404
     Abe
    Keymaster

    you 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.

    #8435
     mpitka
    Participant

    Now it works perfectly! I’m so happy 🙂 Thank you Abe!

    #8453
     Abe
    Keymaster

    You 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.

Viewing 12 posts - 1 through 12 (of 12 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?