Hi,
I have attached a taxonomy as user meta using the 'Taxonomy Advanced' field.
Now, when I go to the archive page for the term, I want to list all users with that term attached to their usermeta.
Using MB Views, I have tried the following:
{% set users = mb.get_users({
meta_query : {
meta_key: 'the_custom_taxonomy',
meta_value: term.id,
meta_compare: 'LIKE',
}
})%}
This returns all users but none seem to have the_custom_taxonomy field in the metadata. I have also tried get_users without the 'meta_query' wrapper array and the same result.
If I get all users first with get_users(), then I can do
{% for user in users %}
{% set umeta = mb.rwmb_meta ('the_custom_taxonomy', {object_type: 'user'}, user.ID) %}
{% endfor %}
but I'd prefer to query directly for users with the term.id.
What is the best way to do this?