Support

Account

Home Forums Front-end Issues ACF Taxonomy Repeater – Get Name

Helping

ACF Taxonomy Repeater – Get Name

  • I have a repeater in Woocommerce categories where the admin can select categories.

    I have chosen Term ID and can output the chosen image and URL, but I can’t seem to get the term name.

    I’ve tried;

    <?php echo esc_html( $post_id->name ); ?>
    					
    <?php woocommerce_page_title($post_id); ?>
    
    <?php echo $post_id->cat_name; ?>
    
    <?php echo '<p>'. get_the_category( $post_id )[0]->name .'</p>'; ?>
    
    <?php  echo esc_html( $post_id[0]->name );   ?>

    None work…..

    Anyone got any ideas, please?

  • You will need to get the term or you will need to return term objects from the field rather than ID.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.