SHARE
TWEET

help-wordpress

a guest Nov 30th, 2012 166 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This is what I have, I want to add images to it for parent categories only.
  2.  
  3. <ul>
  4. <?php wp_list_categories(depth=1); ?>
  5. </ul>
  6.  
  7. This is what I've tried with no resolve.
  8. <ul>
  9.  
  10. <?php foreach (wp_list_categories('depth=1') as $cat) : ?>
  11.  <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" /><br/>
  12.  <div class="product-price">
  13. <a href="<?php echo get_category_link($cat->term_id); ?>"><?php echo $cat->cat_name; ?></a>
  14.  </div>
  15.  <?php endforeach; ?>
  16.  
  17. </ul>
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
 
Top