Display custom taxonomy attached to the post on post single page

You can get every Taxonomy by $categories = get_the_terms( get_the_id(), $taxonomy-slug ); if ( is_array( $categories ) ) { foreach ( $categories as $category ) { echo ‘<a href=”‘ . get_term_link( $category->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $category->name ) . ‘” ‘ . ‘>’ . $category->name.'</a> ‘; … Read more

Get post by term from custom taxonomy in another blog on the network?

I found a small hack to filter by taxonomy without create the taxonomy in the child theme. In the core exists the function “taxonomy_exists“: function taxonomy_exists( $taxonomy ) { global $wp_taxonomies; return isset( $wp_taxonomies[$taxonomy] ); } And is this function who hive “false” because the taxonomy don’t exists in your child theme. If this function … Read more

get_terms function not returning anything

get_terms just returns an array of terms, it doesn’t generate output. You have to do something with that array to see the results- $categories = get_terms( “category” ); echo “<ul>”; foreach ( $categories as $category ) { echo “<li>” . $category->name . “</li>”; } echo “</ul>”; See the other examples on the Codex page.