How to display category image inside a single post of a custom post type?
-
Having troubles implementing the code, needing some help.
How can i call the image of the category in a single post of my custom post type.
Im trying to use:
<?php foreach (get_terms('your_taxonomy') as $cat) : ?> <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" /> <a href="<?php echo get_term_link($cat->slug, 'your_taxonomy'); ?>"><?php echo $cat->name; ?></a> <?php endforeach; ?>
all the images come from subcategories…
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to display category image inside a single post of a custom post type?’ is closed to new replies.