Support » Themes and Templates » Print a custom taxonomy description in a single page

  • Hello.

    I’m trying to echo the description of a custom taxonomy in a single post page, which happens to be of a custom post type (I don’t know if that has something to do in this case).

    I’ve tried several methods for some hours now, but this is the one that makes more sense to me:

    <?php $productoras = wp_get_post_terms($post->id,'mytaxonomy');
    		    foreach ($productoras as $productora) :
    		    echo $productora->description;
    		    endforeach; ?>

    I really don’t know why, but the array $productoras seems to be empty.

    I’ll appreciate your help!

  • The topic ‘Print a custom taxonomy description in a single page’ is closed to new replies.