Support

Account

Home Forums Front-end Issues ACF taxonomy in query Reply To: ACF taxonomy in query

  • Changed ACF in admin area to “Post Object” and then use;

    <?php 
    	$terms = get_sub_field('category');
    	if( $terms ): 
    ?>
        <ul>
        <?php foreach( $terms as $term ): ?>
            <h2>Term: <?php echo esc_html( $term->term_id ); ?></h2>
        <?php endforeach; ?>
        </ul>
    <?php endif; ?>