Support

Account

Home Forums ACF PRO get value from taxonomy term Reply To: get value from taxonomy term

  • Hi @pagol

    If you need to get the fields from the same product category (the current product category page), you only need to set the $product_cat_object variable once like this:

    <?php $product_cat_object = get_queried_object(); ?>
    <h2><?php the_field('side_box_title', 'product_cat_' . $product_cat_object->term_id); ?></h2>
     <?php the_field('side_box_content', 'product_cat_' . $product_cat_object->term_id); ?>

    Hope this clears the thing up 🙂