Sideways8 Simple Taxonomy Images
[resolved] List all tags with thumbnail and tag name (3 posts)

  1. Ponken
    Posted 2 years ago #

    Hi there,

    I'm sorry to ask such a basic question here, but this plugin looks like it'll solve my design problem and I'm not sure how/what I need to add to make it work.

    I would like to list all (non-empty) tags in a custom page template, displaying both the thumbnail and the name. I've found the code to do the latter (below).

    Please can someone tell me what I need to add to include the associated image as well? It would be hugely appreciated.

    $tags = get_tags();
    $html = '<div class="post_tags">';
    foreach ( $tags as $tag ) {
    $tag_link = get_tag_link( $tag->term_id );
    $html .= '<div class="creaturebox">';
    $html .= "<a href='{$tag_link}' title='{$tag->name}' class='{$tag->slug}'>";
    $html .= "{$tag->name}</a>";
    $html .= '</div>';
    $html .= '</div>';
    echo $html;

    Many thanks in advance!


  2. cangpo
    Posted 2 years ago #

    <?php $image_html = s8_get_taxonomy_image(get_term( $your_tax_var->term_id, $your_tax_var->taxonomy ), $size); echo $image_html; ?>

  3. Ponken
    Posted 1 year ago #

    Hi Cangpo! Just noticed you solved this... 11 months ago!! Really sorry I didn't say anything at the time - didn't know anyone had replied at all. Thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Sideways8 Simple Taxonomy Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic