Does "Advanced Custom Fields" taxonomy field support user pages?

I have a “taxonomy” custom field for the user pages. I want to build a query filtered by this field. It works with normal querys but not with user-querys, am i doing something wrong?

<?php
    $args = array(
        'key' => 'fruits', 
        'value' => 'apple'
);

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

// User Loop
    if ( ! empty( $user_query->results ) ) {
        foreach ( $user_query->results as $user ) {
        echo $user->display_name;
        }
    } else {
    echo 'No users found.';
}
?>


Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.