Home › Forums › General Issues › Trying to display a category (taxonomy) field in the fronted › Reply To: Trying to display a category (taxonomy) field in the fronted
Thanks again.
Tried the 3 ways.. Doesn’t work. Echo nothing. 🙁
Here is code i tried for the first option (single object). I also attached a screenshot for the fiel settings in ACF.
<?php
$term = get_field(‘plan_type’);
if( $term ): ?>
<h2><?php echo esc_html( $term->name ); ?></h2>
<p><?php echo esc_html( $term->description ); ?></p>
<?php endif; ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.