<?php $taxonomyName = "layanan"; $terms = get_terms($taxonomyName,array('parent' => 0)); echo '<ul class="layanan_links">'; foreach($terms as $term) { $class = ( is_tax('layanan', $term->slug) ) ? 'layanan_item active' : 'layanan_item'; echo '<li class="'.$class.'"><a href="'.get_term_link($term->slug,$taxonomyName).'">'.$term->name.'</a></li>'; } echo '</ul>' ?>