Last active
December 20, 2015 07:39
-
-
Save energy0m/6095181 to your computer and use it in GitHub Desktop.
this is the product-output that gores with the last one...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $my_cats; | |
foreach ($my_cats as $cat) { | |
//print_r($cat); | |
$category_id = $cat->term_id; | |
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); | |
$image = wp_get_attachment_url( $thumbnail_id ); | |
echo '<li class="product type-product status-publish hentry first instock"><div class="product-image"><a href="'. get_term_link($cat->slug, 'product_cat') .'"><img src="'.$image.'" alt="'. $cat->name .'"/></a></div><div class="product-details"><h3><a href="'. get_term_link($cat->slug, 'product_cat') .'">'. $cat->name .'</a></h3></div></li>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment