WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

I'm trying to display the 'Tag Description' on my tagged pages. I've added an if statement to loop-page.php already to only show custom text when a tagged page is being displayed...

<?php } elseif ( is_tax ( 'product_tag' ) ){ ?><h1 class="entry-title"><?php the_title(); ?> print out this text on page</h1>

... but I don't know the code to output the tag description.

Does anyone know the code to display the tag description? I want it to go after the H1 in the above code. I'm trying to output the description that is entered when you go into Wordpress Admin>Products>Product Tags>Description using WPeC 3.8.

I'm using the Twenty10 theme, WPec 3.8 and WP 3.1

Thanks for your help


share|improve this question
up vote 0 down vote accepted

get the term by its slug and echo out the descriptions

elseif {is_tax ( 'product_tag' ) ){ 
  $term_slug = get_query_var( 'term' );
  $taxonomyName = get_query_var( 'taxonomy' );
  $current_term = get_term_by( 'slug', $term_slug, $taxonomyName );
  ?><h1 class="entry-title"><?php echo $current_term->description; ?></h1> <?php
share|improve this answer
awesome, thank you so very much! I haven't yet gotten to the stage of developing my product category pages yet, but I think if I also need to pull in the description for these pages that I'll be able to adapt this code also. Thanks again, really appreciate it! – Dean Rowe May 9 '11 at 11:29
I don't know how to mark this as [Solved] and don't yet have the reputation to Vote Up your answer, I'll come back to do this once I have that ability. Thanks again – Dean Rowe May 9 '11 at 11:32

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.