• Resolved Tabashira

    (@tabashira2)


    i have that code for showing categories along with the description and category images
    but i need to display only the subcategories for the current category
    how can i modify that code ??

    <ul>
     <?php foreach (get_categories() as $cat) : ?>
     <li>
     <img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" />
     <a href="<?php echo get_category_link($cat->term_id); ?>"><?php echo $cat->cat_name; ?></a>
     <div class=\"description\"><?php echo  $cat->description; ?></div>
     </li>
     <?php endforeach; ?>
    </ul>
  • The topic ‘subcategories Code Error ??’ is closed to new replies.