Ok so i have a custom post type called 'profile' with a custom taxonomy called 'company'. The site has many profiles and companies defined, with profiles being associated with companies as necessary.

I have created a taxonomy-company.php template and have the correct profiles being displayed, but i don't know how to get the name of the company being displayed so that i can put it at the top of the template.

Is there a quick way, perhaps a variable or function call that gets me that?


1 Answer 1


$wp_query->get_queried_object() will give you the taxonomy term you're currently displaying. It works in many other situations too, like categories, authors, ...


Your Answer

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

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