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, ...

  • what property would i use to display the term name? Commented Dec 30, 2010 at 17:29
  • nevermind i got it. Commented Dec 30, 2010 at 19:15

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.