I am trying to query in a post to show a fixed line of text at the end, so that if that post has a specific taxonomy tag applied to it (Special), then a line of text will show.

I guess it's something simple, but can't get a query to work :(

Would really appreciate any help!

1 Answer 1


You could use has_term Codex, like the following code:

if( has_term( 'jazz', 'genre' ) ) {
    echo 'This is something...';

Remember to add the third parameter - $post (int or object), if it's not in the loop.

  • Great. Could you mark my answer as "accepted"? Thanks.
    – 1fixdotio
    Feb 15, 2014 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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