Home › Forums › Back End › Need help for custom post type › Reply To: Need help for custom post type
October 8, 2018 at 3:48 am
#277369
carmine96
Participant
Try this for wp:
<?php
$taxonomy = 'your taxonom';
$terms = get_terms($taxonomy); // Get all terms of a taxonomy
if ( $terms && !is_wp_error( $terms ) ) :
?>
<ul>
<?php foreach ( $terms as $term ) { ?>
<li><a href="<?php echo get_term_link($term->slug, $taxonomy); ?>"><?php echo $term->name; ?></a></li>
<?php } ?>
</ul>
<?php endif;?>
?>