BuddyDev

Search

Sticky Members in BuddyPress

  • Participant
    Level: Initiated
    Posts: 14
    Cordial on #50984

    I don’t know if this is possible with BuddyPress.

    But I wouldn’t know if I don’t ask.

    QUESTION
    Is there any way in BuddyPress to make some Members sticky?

    For example, in WordPress, we have something called Sticky Post— where a Post that has been made to be sticky will always stay first.

    I’m looking at making the Profile of Four(4) of our Members to have this sticky nature– so that irrespective of new Members registering, these particular Members Profiles will always stay first.

    USE CASE
    I’m proposing a Free Online Directory for the Men of my Church.

    But I need the Head Pastor to come first, followed by his wife.

    Then the Assistant Pastor will come Third, followed by his wife– while other Members can then follow.

    Is this kind of Sorting Order possible with BuddyPress?

    2.) I see the possibility of what I’m asking, if there’s a Code Snippet that will use the User ID for the Sorting.

    It will happen in such a way that if we enter some User IDs, it will allow the User IDs take pre-eminence over other Profiles.

    So it will assign the User IDs first priority, before calling in the other Profiles.

    Have you ever seen/ heard or done something like this before?

    Regards.

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

    Hi,
    Thank you for the question.

    1. Is it doable?
    Certainly yes, with custom code. All you need to do is push these users on the BuddyPress members template( $members_template). Your best best is to use ‘bp_has_members’ and update the template variable or re-create it.

    2. Is there any existing solution:- We haven’t seen any till now.

    3. Can you help me? I am sorry but we are unable to help with any custom code for next 8 weeks due to our own project.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 900
    Tosin on #51321

    I really love this idea and its also been on my mind for long now, since I didnt know if this was possible I just decided to stick with the buddypress featured members plugin.

    I would be awesome if there is an option to also make featured members sticky

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #51326

    Hello Tosin,

    Thank you for sharing your interest in it. You can use the filter ‘bp_core_get_users’ to parse the loop and sort results based on featured members. As in the following manner, WordPress handles sticky posts. It simply checks sticky posts for the current result set and pushes sticky posts at the start of the result. You can try to do it in the same way.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved