Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $current_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); //this is alraedy called on top of taxonomy-term.php file ?>
- <ul class="list-child-pages">
- <?php
- $args = array(
- 'taxonomy' => 'benefit-category',
- 'orderby' => 'menu_order',
- 'hide_empty' => true,
- );
- ?>
- <?php $benefit_categories = get_terms($args); ?>
- <?php foreach ( $benefit_categories as $benefit_category ) { ?>
- <li <?php if ( $current_term->slug == $benefit_category->slug ) { ?> class="current-term" <?php } ?>>
- <a href="<?php echo home_url(); ?>/benefit-category/<?php echo $benefit_category->slug; ?>"><?php echo $benefit_category->name; ?></a>
- </li>
- <?php } ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement