Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * change 'product_cat' to your desired taxonomy.
- */
- $categories = get_terms( array(
- 'taxonomy' => 'product_cat',
- 'hierarchical' => false,
- ) );
- $cat_list = array();
- sort_terms_hierarchically( $categories, $cat_list );
- if ( $cat_list ) {
- echo '<ul class="terms-list">';
- echo sidebar_cat_list( $cat_list );
- echo '</ul>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement