Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="countries">
- -country
- -country
- -country
- </div>
- <?php if ( !has_term('juice', 'types' ) ): ?>
- <div class="countries">
- <p>Country</p>
- <ul>
- <?php
- //get the current term
- $current_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
- //then set the args for wp_list_categories
- $args = array(
- 'child_of' => $current_term->term_id,
- 'taxonomy' => 'countries',
- 'hide_empty' => 1,
- 'order' => 'ASC',
- 'show_count' => 1,
- 'hierarchical' => true,
- 'depth' => 1,
- 'title_li' => ''
- );
- wp_list_categories( $args );
- ?>
- </ul>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement