This plugin is exactly what I am looking for, unfortunately it doesn’t work for me.
I have products (custom post types) and a taxonomy to group all of them in a custom categories.
I have template for a single product and a template for the taxonomy.
I have an additional template which displays all the terms created inside a nice layout.
I wanted to be able to show image associated with a taxonomy term so I used “Taxonomy Images” plugin but I can’t figure out how to display the image associated with a term inside my template
here is my code that displays a loop of all terms created automatically:
<?php $args = array('taxonomy' => 'products'); ?> <?php $tax_menu_items = get_categories( $args ); foreach ( $tax_menu_items as $tax_menu_item ):?> <div class="box"> <h2><?php echo $tax_menu_item->name; ?></h2> <a href="<?php echo get_term_link($tax_menu_item,$tax_menu_item->taxonomy); ?>"> <img src="<?php bloginfo('template_directory'); ?>/images/Mahit_135px.png" alt="" /> </a> <p> <?php echo $tax_menu_item->description; ?> </p> </div> <?php endforeach; ?>
there is an image inside the loop (just a sample image for now)
I would like to know what line of code should I replace the sample image with in order to display the taxonomy term image uploaded via the plugin.
- The topic ‘[Plugin: Taxonomy Images] Cant get the image to display in my theme’ is closed to new replies.