how to convert this code?
-
The code below pulls child categories of a parent, works perfectly.
Still i want to use this type of solution for TAXONOMIES, any ideas how to convert this?
<?php global $ancestor; $childcats = get_categories('child_of=' . $cat . '&hide_empty=1'); foreach ($childcats as $childcat) { if (cat_is_ancestor_of($ancestor, $childcat->cat_ID) == false){ echo '<a class="trick product-search-item" href="'.get_category_link($childcat->cat_ID).'">'; echo '<img src='; echo z_taxonomy_image_url($childcat->term_id); echo '>'; echo '<div class="icon"></div>'; echo '<span>'; echo $childcat->cat_name . '</span>'; echo '</a>'; $ancestor = $childcat->cat_ID; } } ?>
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘how to convert this code?’ is closed to new replies.