0

In archive-news.php, i've tried

global $wp_query;

$tax = $wp_query->get_queried_object();
echo $tax->name;

But this gets the taxonomy, not the taxonomy term.

I need to print the tax term name for each entry on the archive page which lists posts in the custom post type.

1 Answer 1

-1

wp_get_post_terms did the trick

1

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.