Output taxonomy icon
-
I would like to show the taxonomy icon in place of the taxonomy name. Right now I have this code to show the name and it works well
-
<?php
$recipe_method = get_the_terms( get_the_ID(), ‘recipe-method’ );
if( !empty( $recipe_method ) ){
$recipe_method = array_shift( $recipe_method );
}
?>
<?php _e( ‘Method:’, ‘recipe’ ) ?>
<span class=”value”>
$recipe_method->slug ), $permalink ) ) ?>”><?php echo $recipe_method->name;?>
</span>
I have tried to use the output on the description page but it does not work. I want it to dynamically show the icon associated with the taxonomy in each post, I hope you understand what I mean and can direct me in the right direction. I will appreciate any help thanks
-
<?php
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Output taxonomy icon’ is closed to new replies.