Display current taxonomy term when inside custom post type in WordPress

Display-current-taxonomy-term-when-inside-custom-post-type

This code you can use for the current taxonomy term when inside all custom post types WordPress.

<?php 
foreach (get_the_terms(get_the_ID(), 'unlimited') as $cat) {
 echo '<p>';
  echo '<a href="' . esc_url( get_term_link( $cat ) ) . '" >' . $cat->name . '</a>';
 echo '</p>';
}
?>
Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact us

Fill in the form below or give us a call and we'll contact you. We endeavour to answer all enquiries within 24 hours on business days.