Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide admin profile


  • vinem
    Participant

    @vinem

    Hi there,

    I’ve seen a lot of people asking this but no one provided a good solution to do so.
    So, is there a way to hide the admin profile from other members ?
    I don’t want my activities to appear in the stream or people to have access to my admin profile.

    I tried a bunch of plugins and code lines I found through Google but nothing worked.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)

  • wpthemes
    Participant

    @wpthemes

    You can try this, lets say your admin user IDs are 1 and 23

    add_filter('bp_activity_get_where_conditions',function($where){
    if(!current_user_can('manage_options')){
    $where[]='user_id NOT IN (1,23)';
    }
    return $where;
    });

    vinem
    Participant

    @vinem

    Hi,
    Thx!

    But what am I supposed to do with this? Do I put it in bp-custom.php, like the other I found?

    Thank you!


    wpthemes
    Participant

    @wpthemes

    Yes, place it in theme – functions.php or bp-custom.php


    vinem
    Participant

    @vinem

    Hi again!

    So I tried to add your code.
    It works on the profile page, no activities are showing, but they’re still visible on the global activity feed and my account is not hidden in the members directory.

    Any idea?
    Thx!


    Elena Marcu
    Participant

    @rochiidemireasa

    Thank you, works for me!


    EvelyneLamb
    Participant

    @evelynelamb

    How do I create a Hide admin profile ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar