List custom taxonomy with hierarchy
-
I have this code:
<?php //ot tuk pochva tva za kategoriite $taxonomy = 'bizneskategorii'; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></li>'; } ?> </ul>
And it works good – it shows me the terms in the taxonomy bizneskategorii, but it doesn’t differentiate between them in the hierarchy and displays them normally. Can someone edit the code so that it can make a difference between a category and a sub-category?
Thank you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘List custom taxonomy with hierarchy’ is closed to new replies.