marko krstić

Collections

Archives

Display list of custom taxonomies that are related to a particular post on your single page

<?php

	global $post;
	$terms = get_the_terms( $post->ID, 'projekte_cat' );
		foreach ($terms as $term) {
	    $term_id = $term->term_id;
  		$term_name = get_term( $term_id )->name;
		$term_slug = get_term( $term_id )->slug;
  	echo '<div class="'.$term_slug.'">'. $term_name . '</div>';
}

?>

Replace "projeckte_cat" with your taxonomy slug.

Let's Connect

Feel free to reach out for collaborations or just a friendly hello ?
[email protected]
linkedininstagramdribbblefacebook-official