BuddyDev

Search

Member Types Pro – Displaying based on type

  • Participant
    Level: Enlightened
    Posts: 38
    Granmeh on #30579

    Hi Brajesh,

    I’m lost. πŸ™

    Based on the member type, how can I display teachers to students and students to teachers through the plugin ? Do I need to add code in my bp-custom file or can I set up in the plugin ?

    And If I can setup in the plugin, how can I do that ?

    Regards,

    Granmeh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #30582

    Hi Granmeh,
    Do you want to limit the members list in the directory.
    e.g when a student is logged in, they only see teachers?
    and when a teacher is logged in, they only see students?

    Please let me know and I will assist.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 38
    Granmeh on #30585

    Yes, exactly. When students are logged in they only see teachers and vice verca. In my case, it’s male and female.

    Thanks a lot,

    Granmeh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #30730

    Hi Granmeh,
    Thank you for the patience.

    You may use following code in bp-custom.php to achieve that

    https://gist.github.com/sbrajesh/f7350e1687505bd10f94e6233a70ead2

    It assumes the users have member type ‘male’, ‘female’. Please feel free to update as needed.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #30812

    Hi,
    There was a minor issue in the code I posted earlier. I have updated it
    https://gist.github.com/sbrajesh/f7350e1687505bd10f94e6233a70ead2

    Please use the updated version.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 38
    Granmeh on #30842

    Hey Brajesh,

    Thanks a lot, I’ll try right away.

    Regards,

    Granmeh

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #30847

    Thank you. I look forward to it.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved