Support

Account

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>