Hello
I have create a field type taxonomy
I want to display the name of this category on front end
with: <?php the_field(‘taxonomy’); ?>
but it return a number ( Id ?) and not the name of the taxonomy
What is the PHP code ?
also i want to return the url of this taxonomy ? What is the PHP code ?
Thanks !
Hi JF,
You can try this one, it should works:
<?php $term = get_field('taxonomy');
if( $term ):
echo $term[0]->name;
endif; ?>