I'm attempting to display a specific taxonomy (channel) in the archive.php page. I want to display the taxonomy's URL, name, post count, and taxonomy image.
This is what I have that's working so far:
<?php
$taxonomy = 'channel';
$tax_terms = get_terms($taxonomy);
$image_url = print apply_filters( 'taxonomy-images-queried-term-image', '' );
?>
<ul>
<?php
foreach ($tax_terms as $tax_term) { ?>
<li>
<?php echo esc_attr(get_term_link($tax_term, $taxonomy)); ?>
<?php echo $tax_term->name; ?>
<?php echo $tax_term->count; ?>
<?php echo $image_url->image_id; ?>
</li>
<?php } ?>
</ul>
I've gotten URL, name and post count working, the part that's not working is the taxonomy image provided by the Taxonomy Images plugin. (in the snippet, it's $image_url)
https://wordpress.org/plugins/taxonomy-images/
The plugin provides a image_id for an image added to a taxonomy, the plugin has a ton of ways to get the ID and display the image but I just can't seem to find the correct combination to work with my snippet with my level of skill.
Need some help, thanks.