<?php
$terms = get_terms( array(
'taxonomy' => 'vehicle_type',
'hide_empty' => false,
) );
$count = count( $terms );
if ( $count > 0 ) {
echo '<h3>Total Projects: '. $count . '</h3>';
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li>' . $term->name . '</li>';
}
echo '</ul>';
}
?>
OR
$terms = get_terms( 'post_tag', array(
'hide_empty' => false,
) );
Comments
Post a Comment