Skip to content

Instantly share code, notes, and snippets.

@krazylegz
Forked from nicksatkovich/gist:5287253
Last active December 15, 2015 16:09
Show Gist options
  • Select an option

  • Save krazylegz/5287416 to your computer and use it in GitHub Desktop.

Select an option

Save krazylegz/5287416 to your computer and use it in GitHub Desktop.
<?php
$term_list = '';
$terms = get_terms('product_cat', array( 'taxonomy' => 'product_cat', 'child_of' => 16, 'exclude_tree' => 15 ););
foreach ($terms as $term) {
$term_list .= '<li><a href="/shop/product-category/' . $term->slug . '/" title="' . sprintf(__('View all products filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '</a></li>';
}
echo $term_list;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment