tag images for products in a category
-
Hi There. very useful plugin. Thanks v much.
I am using it in the sidebar of a store and trying to get it to show tag images for products within a category but, at the mo, its just showing all tag images.
For example, I have a product category called ‘sunglasses’ and, in the category view for that, where my prods are listed, I want the sidebar to show tag images for all the prods in that category only.
I am using this code – but its shows tag images for all products – not just the prods in the sunglasses category
$terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=> 'product_tag')); if ( ! empty( $terms ) ) { foreach( (array) $terms as $term ) { print '<div style="float:left;margin-right:8px;"><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '?product_cat=sunglasses">' . wp_get_attachment_image( $term->image_id, 'thumb10040' ) . '</a></div>' ; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘tag images for products in a category’ is closed to new replies.