Getting Catategory / Taxonomy Description on Non-archive Pages

Can you pull in the description of a custom tax on pages other than the taxonomy-(custom-tax).php

i.e on the home page you want to show the description of a custom tax.

This works on the aforementioned archive page but nowhere else:

<?php echo term_description( '', get_query_var( 'taxonomy' ) ); ?>

Many thanks for any help.


Simply use the term id to replace '' and the taxonomy name to replace get_query_var( 'taxonomy' ).

echo term_description( $term_id, 'your_custom_tax_name_here' );

P.S. Have you ever heard about Codex?

Source : Link , Question Author : user4630 , Answer Author : s_ha_dum

Leave a Comment