hey @luizbriganti,
i guess you got lost in Types docs too… i’ve been looking for a PHP sample in their docs, but it’s quite a task…
anyhow, i think i’ve just managed to do that. say we are in single.php loop, and for “creative” taxonomy, you’d do:
$terms = get_the_terms( get_the_ID() , "creative");
$count = count($terms);
if ( $count > 0 ) {
foreach ( $terms as $term ) {
echo $term->name;
}
}
…my issue is now how to output the custom fields that i’ve attached to the taxonomy, like “creative’s website” or “creative’s email”.
still looking for an answer, but i haven’t found a clear hint in Types documentation.
hope someone from the team has an answer for that.
Anonymous User 14808221
(@anonymized-14808221)
hi Beda, thanks a lot for the directions.
types_render_termmeta("creative-website", array( "term_id" => $term->term_id ) ); did the trick!