BuddyDev

Search

Hide Friends of a User from Other users.

  • Participant
    Level: Initiated
    Posts: 9
    Vicki on #2163

    Hi Brajesh,

    I tried to use the code in the following link to hide friends from other users so that only the site admin and the user can see his or her friends –> https://buddydev.com/snippets/182-hide-friends-of-a-user-from-other-users/

    However, the code is a few years old and seems not to be working anymore with the current BuddyPress and WordPress 4.4. It shows a blank page when I click on the “friends” button in the top menu.

    Could you please let me know which current code will work to hide the friends tab from everyone expect the user and admin?

    Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 21467
    Brajesh Singh on #2177

    Hi Vicki,
    Have you put this code in bp-custom.php

    I tried the code and it is working perfectly for me. Can you please post me a screenshot to show the issue?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 9
    Vicki on #2184

    Hi Brajesh,

    If it’s working perfectly for you, then maybe I wasn’t putting the code in the right section.
    I’ll check one more time and let you know if it works.

    Also, could you please let me know specifically what is the best way to “noindex” buddypress pages, such as the members directory, from search engines like Google so that users’ avatars don’t show up in search results?

    Thank you.
    & Happy New Year!

  • Keymaster
    (BuddyDev Team)
    Posts: 21467
    Brajesh Singh on #2185

    Hi Vicky,
    Happy New Year 🙂

    Yes, Please give that code a re-try and let me know.
    For no indexing, It will be difficult to avoid avatars from getting unlisted. I don’t have much knowledge about the SEO, but if you or someone can tell me which tags to add, I amy be able to help here.

    In the meantime, you may want to give this plugin a try
    https://wordpress.org/support/view/plugin-reviews/ultimate-noindex-nofollow-tool-ii

    Hope that helps.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved