Get The Terms/ Custom Taxonomy of A Custom Post In a Loop

Share Now

<?php
$postid = get_the_ID();
$sp_terms = get_the_terms( $postid, 'Speaker-Category' );
?>
<?php foreach( $sp_terms as $sp_term ): ?><?php echo $sp_term->slug; ?> <?php endforeach; ?>
Picture of Nahid Mahamud

Nahid Mahamud

Web Developer | Graphic Designer | WordPress & Woo-commerce Expert