Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filter Member Loop by taxonomy and based with ‘OR’.


  • matteocinti90
    Participant

    @matteocinti90

    Hi I am trying to create a filter for the members loop ( bp_has_members()) and combining it with taxonomies I have connected with the wp_profile is that possible ?

    get_user_meta( $user_id, 'profession', true ); this is where the taxonomies are stored.

    On second hand I would also like to have fallbacks possibilities and if by taxonomy doesn’t produce enough results filter by ’email’ for example. So instead of taxonomy AND email, taxonomy OR email. I thought of creating another query under the first one but that would result very messy.

    Thank you.

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

  • VibeThemes
    Participant

    @vibethemes

    It is possible but not recommended. BuddyPress already has member profile fields. You should use that and it is internally supporpted by buddypress, just make sure you enable the “auto-link” in the profile field while editing the profile field.

    If you are open on exploring, the WPLMS theme has members directories built on react and they are well connected with BuddyPress profile fields, example : https://demos.wplms.io/members-directory/


    spyglassweb
    Participant

    @spyglassweb

    The problem with member profile fields is that a user can only be assigned to one profile type. In our case, members can be in multiple roles.

    Is there a solve for this? I was also looking at custom taxonomies or just adding a custom user field.

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