Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filter User Query By BuddyPress Custom Profile Field


  • Jake Ward
    Participant

    @jakeward

    We have a custom BuddyPress profile field which is a select dropdown.

    Elsewhere in the site we have a user query, that pulls in users of a certain role. However, we need to filter these users again by those who have a certain value in the dropdown field. Is there a way to add this to to the WP_User_Query?

    I’ve seen documentation for BP_User_query but haven’t been able to get it to work.

                $args = array(
                'role' => 'vendor',
                'orderby' => 'display_name',
                'order'     => 'ASC',
                'number' => 5,                
                );
                $user_query = new WP_User_Query( $args );
    
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar