How to get multiple taxonomy for custom post in WordPress

How-to-get-mutiple-taxonomy-for-Cutome-post

This code use for you can get multiple taxonomy in your post, this code adds your function.php file in WordPress.

<?php
function getPropertyAction($post_id){
 $terms = get_the_terms( $post_id, 'Taxonomy Name' );
 $on_draught="";
 if ( $terms && ! is_wp_error( $terms ) ) {
  $draught_links = array();
  foreach ( $terms as $term ) {
   $term_link = get_term_link( $term );
   $draught_links[] = "<a href=".$term_link.">".$term->name."</a>";
  }
  $on_draught = join( ", ", $draught_links );
 }
 echo $on_draught;

}
?>
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.