a guest Jul 16th, 2014 232 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php foreach (get_the_terms(get_the_ID(), 'productcategory') as $cat) : ?>
  2.         <?php if($cat->parent < 1): // Only Parent Category, if you want the Sub-category, delete the If?>
  3.                 <img src="<?php echo z_taxonomy_image_url($cat->term_id); // URL of the Image ?>" alt="<?php echo $cat->cat_name ; // Name of the Category ?>" />
  4.         <?php endif; ?>
  5. <?php endforeach;?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand