Home › Forums › ACF PRO › Sub_field Taxonomy term, returning ID only… need value › Reply To: Sub_field Taxonomy term, returning ID only… need value
Hi John, many thanks for getting back to me. I’ve tried to implement the above, but must be missing something… current template code is below, but I’m still just getting the ID (not desired) + Paragraph text (desired) outputted.
Many thanks in advance…
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
if( have_rows('question_answers') ):
while ( have_rows('question_answers') ) : the_row();
?>
<div class="country-answer">
<h2><?php $country = get_sub_field('ques_jurisdiction');
echo $country;
$term = get_term_by('id', $term_id, 'wgd_jurisdiction');
echo $term->name;
?>
</h2>
<?php the_sub_field('ques_answer');?>
</div>
<?php
endwhile;
else :
// no rows found
endif;
?>
<?php ?>
</div>
</article>
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.