Thread Starter
yami54
(@yami54)
Thanks a lot allisonplus,
it is working with the following code:
<?php
$term_args=array(
'hide_empty' => false,
'orderby' => 'name',
'order' => 'ASC'
);
$client = get_terms( 'client', $term_args );
if ( ! empty( $client ) && ! is_wp_error( $client ) ){
echo '<div class="clientwrapper grid"><ul class="clienttags">';
foreach ( $client as $term ) {
$term_link = get_term_link( $term );
if ($term->count > 0) {
echo '<li><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a></li>';
}elseif ( $term->count !== 0 ){
echo '<li>' . $term->name . '</li>';
}
}
echo '</ul> </div>';
}
?>
thank you