WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
what property would i use to display the term name? – Jason Miesionczek Dec 30 '10 at 17:29
nevermind i got it. – Jason Miesionczek Dec 30 '10 at 19:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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