Support » Plugin: Taxonomy Images » Trouble listing thumbnail per cat in category list

  • I have a list of sub-categories that displays when a user is on a parent category page. I want to include a thumbnail of each category in that list.

    On my page (http://www.be-hold.com/category/category) two categories have images attached, and both of those categories also have posts (not sure if that matters).

    My problem is that every category has the same thumbnail.

    Any suggestions?

    <?php
    	$this_category = get_category($cat); 
    
    		<ul class="sub-categories">
    		<?php $cats = get_categories('sort_column=ID&sort_order=asc&list=1&optioncount=0&hide_empty=0&use_desc_for_title=1&children=0&child_of='.$cat.'&hierarchical=1&title_li='); ?>
    
    		<?php foreach ( $cats as $category ) {
    
    		print apply_filters( 'taxonomy-images-list-the-terms', '', array(
    			'taxonomy'     => 'category',
    			'term_id' => $category->term_id
    			) );
    
            echo '<li>&nbsp;<a href="/category/' . $category->slug . '">' . $category->name . '</a></li>';
        	}
        	?>
    		</ul>

    What am I doing wrong?

    https://wordpress.org/plugins/taxonomy-images/

  • The topic ‘Trouble listing thumbnail per cat in category list’ is closed to new replies.