Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

Thanks.

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.