Displaying taxonomy titles
-
I have the following code:
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?>
Works perfectly well in displaying terms but doesn’t retrieve titles.
Example, I have a taxonomy “engine”.. I want the the results displayed as “Engine: V8”
Can any coding guru’s offer me any words of wisdom on how to rectify this please?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Displaying taxonomy titles’ is closed to new replies.