Latest Post

How to get mutiple taxonomy for Cutome post in WordPress

How to get mutiple taxonomy for Cutome post in WordPress

How to get mutiple taxonomy for Cutome post in WordPress


This code use for you can get mutiple taxonomy in your post.

<?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;

}
?>

No comments