If you want to display a list of all terms in a taxonomy, you can call wp_list_categories()
and pass the taxonomy
argument to get anything other than the categories:
wp_list_categories( array(
'taxonomy' => 'your-taxonomy'
) );
If you want to use a shortcode for this, so you can use it in your post content, use add_shortcode()
. This untested example code allows you to use [taxonomy_terms]
or [taxonomy_terms taxonomy=my-taxonomy]
in your content:
add_shortcode( 'taxonomy_terms', 'wpse4668_taxonomies' );
function wpse4668_taxonomies( $atts )
{
// Sanitize our input
$atts = shortcode_atts( array(
'taxonomy' => 'your-default-taxonomy',
), $atts );
// Don't echo the output, just return it
$atts['echo'] = 0;
return wp_list_categories( $atts );
}