Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Added code
Source Link
Chozen
  • 163
  • 2
  • 8
  • 24

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:

https://pastebin.com/W8fMDuuM

<?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 aan image added to a taxonomy, the plugin has a ton of ways to get the idID and display the image but I just can't seeseem to find the correct combination to work with my snippet with my level of skill.

Need some help, thanks.

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:

https://pastebin.com/W8fMDuuM

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 a 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 see to find the correct combination to work with my snippet with my level of skill.

Need some help, thanks.

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.

Source Link
Chozen
  • 163
  • 2
  • 8
  • 24

Get taxonomy url, name, post count & image

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:

https://pastebin.com/W8fMDuuM

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 a 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 see to find the correct combination to work with my snippet with my level of skill.

Need some help, thanks.