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 1 replies (of 1 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/

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