Skip to content

Instantly share code, notes, and snippets.

@walterjaworski
Created June 9, 2014 19:29
Show Gist options
  • Save walterjaworski/db8075608bbed22d06f6 to your computer and use it in GitHub Desktop.
Save walterjaworski/db8075608bbed22d06f6 to your computer and use it in GitHub Desktop.
Puxando as taxonomias de um custom post type
<?php
/*
* "tipos", "pragas" e "culturas" são taxonomias vinculadas ao custom post type
* http://codex.wordpress.org/Function_Reference/get_the_term_list
*/
echo '<h2>Tipo</h2>';
echo get_the_term_list( $post->ID, 'tipos', '', ', ', '' );
echo '<h2>Para controle de</h2>';
echo get_the_term_list( $post->ID, 'pragas', '', ', ', '' );
echo '<h2>Utilizado em</h2>';
echo get_the_term_list( $post->ID, 'culturas', '', ', ', '' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment