Skip to content

Instantly share code, notes, and snippets.

@cwulff
Forked from madysondesigns/gist:3912634
Created January 20, 2014 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwulff/8527937 to your computer and use it in GitHub Desktop.
Save cwulff/8527937 to your computer and use it in GitHub Desktop.
In functions.php:
function get_taxonomy() {
$taxonomy = wp_get_object_terms( $post->ID, '[taxonomy]', array("fields" => "names") );
$taxonomy = $taxonomy[0];
echo $taxonomy;
}
In the loop:
<?php get_taxonomy() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment