• Resolved babyboy808

    (@babyboy808)


    Does this plugin only display associated terms on the front-end or can it be used with WP_User_Query to filter users?

    Example:

    $args = array
    (
        'role' => 'member',
        'tax_query' => array
        (
            'relation' => 'OR',
            array
            (
                'taxonomy' => 'colour',
                'field' => 'slug',
                'terms' => array( 'red' ),
                'operator' => 'IN'
            )
        )
    );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author shawfactor

    (@shawfactor)

    Not as yet (at least not directly). But you can do something like this:

    $taxonomy = ‘shop-category’;
    $users = get_objects_in_term( $term_id, $taxonomy );

    if(!empty($users)){

    // WP_User_Query arguments
    $args = array (

    ‘include’ => $users
    );

    // The User Query
    $user_query = new WP_User_Query( $args );

    • This reply was modified 7 years, 5 months ago by shawfactor.
    Plugin Author shawfactor

    (@shawfactor)

    Resolving for good order, I will still monitor this thread

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can this plugin be used in conjunction with WP_User_Query?’ is closed to new replies.