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.

I'm creating a template for a custom taxonomy for my theme.

At the beginning of the page, before the loop that lists all the posts associated to a term of that taxonomy, I want to output the description for that term.

I have tried with

term_description()

but it doesn't work, no output... get_the_terms and other functions I know are meant to work within a loop for individual posts (with post->ID)...

Anyone has a clue on how to achieve this? many thanks

share|improve this question
1  
Are you using echo or print to show the function's output? –  mrwweb May 21 '12 at 20:13
    
oh had to echo it, that was simple to solve, thanks! –  nekojira May 21 '12 at 20:37
1  
Glad that resolved it. Make sure to accept the post answer then. –  mrwweb May 21 '12 at 21:18
add comment

1 Answer 1

up vote 1 down vote accepted

The term_description() function returns the description rather than echoing or printing it.

To fix the issue, use:

echo term_description();
share|improve this answer
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.