[Plugin: WooCommerce] Product Category Thumbnail not displaying
-
The code on taxonomy-product_cat.php (below) is not displaying the product category thumbnail. Side note: I added a new size “brand_thumbnail” to my theme, but it wasn’t working prior to using “shop_thumbnail” or “shop_category”.
<?php $term = get_term_by( 'slug', get_query_var($wp_query->query_vars['taxonomy']), $wp_query->query_vars['taxonomy']); ?> <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'brand_thumbnail'); else echo '<img src="'.$woocommerce->plugin_url().'/assets/images/placeholder.png" alt="Placeholder" width="310px" height="265px" />'; ?>
Is there something wrong with my post_thumbnail ($loop…….)?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[Plugin: WooCommerce] Product Category Thumbnail not displaying’ is closed to new replies.