1

I am trying to return users taxonomies which where generated from using a plugin and then registering the taxonomy in the functions file.

The taxonomy generates a checkbox list in the standard user profile section to which you select the taxonomy you wish to use.

I simply canot get it to output, I am fetching everything else just fine like so for example:

$consultant = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));

And to fetch the name I do: echo $consultant->first_name

I have registered this taxonomy with the name of 'Skills'

I have tried a number of methods but nothing seems to be outputting the array.

1 Answer 1

0

You can use wp_get_object_terms once you have the $consultant. For example:

$user_terms = wp_get_object_terms( $consultant->ID, 'skills' );

Note that you can use the third argument to customize the term query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.