BuddyDev

Search

[Resolved] HIDE CERTAIN MEMBER TYPE

Tagged: , ,

  • Participant
    Level: Enlightened
    Posts: 36
    Jimmy Cheung on #34909

    Hi Brajesh,

    Besides using this function to hide members directory.

    /**
    * Hide Members Directory from everyone.
    */
    function buddydev_hide_members_directory_for_all() {
    if ( bp_is_members_directory() ) {
    bp_do_404();
    load_template( get_404_template() );
    exit( 0 );
    }
    }

    add_action( ‘bp_template_redirect’, ‘buddydev_hide_members_directory_for_all’ );

    ————————————–

    Can this function be redirect to certain page I like to use?

    or even better,

    Is there’s a function I can use just to hide the ALL MEMBERS and also hide the other Member Type as well? Let’s say, I login as male only see male, or logged-in female the same way on members page.

    Please advise for function,
    Thanks,
    Jimmy

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 1536
    Ravi on #34913

    Hello Jimmy,

    Thank you for posting. There is a post in which we describe to show member from opposite gender with little bit of modification you can use it for your requirement. Please have a look:

    https://buddydev.com/show-only-users-of-opposite-genders-on-buddypress-site/

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 36
    Jimmy Cheung on #34934

    Hi Ravi,

    I tried the function, it’s not working? Can you tell me which area(s) I should change?

    How can I take out ALL MEMBERS completely, and also one of the Member Type Female/Man for the members page when it load?

    All I wanted is ONLY one gender to show on the members page. Login Guy only see MEN Members Type, Vise Versa for the WOMEN.

    For my user’s field, I set I AM A “Man , Woman”.

    Please advise how to make this to work?
    Thanks,
    Jimmy

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 1536
    Ravi on #35054

    Hello Jimmy,

    Sorry for the delayed reply. Can you provide me a temporary admin account details so that I could help you.

    Ravi

  • Participant
    Level: Enlightened
    Posts: 36
    Jimmy Cheung on #35117
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 1536
    Ravi on #35133
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 36
    Jimmy Cheung on #35138

    Hi Ravi,

    OMG!!! It works like a charm for both genders.

    Man, it will takes me over 10 + years to get it going. You did it in just few minutes!!!

    Thank you so much again Ravi, you rock big time!!!

    Jimmy

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 1536
    Ravi on #35140

    Hello Jimmy,

    Thank you for the kind words. I am glad that I could help.

    Regards
    Ravi

The topic ‘ [Resolved] HIDE CERTAIN MEMBER TYPE’ is closed to new replies.

This topic is: resolved
Subscribe