Support

Account

Home Forums Front-end Issues Taxonomy inside repeater in categories

Unread

Taxonomy inside repeater in categories

  • In ‘Product Categories’ I’ve created a repeater called upsells and inside is a taxonomy called ‘Category’.

    It works fine in the admin area, as can select which categories I want. However, I can’t get them to appear in the repeater…

    <?php 
    	$term = get_queried_object();
    	if( have_rows('upsells') ): 
    ?> 
        <?php while( have_rows('upsells') ): the_row(); 
            $category = get_sub_field('category', $term);
        ?> 
        	<?php echo $category; ?>
        <?php endwhile; ?>        
    <?php endif; ?> 
    <?php wp_reset_query(); ?>
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.