Home Forums Front-end Issues Field in front end of woo shop page for items


Field in front end of woo shop page for items

  • Hello I want to show a field in the front end of my woocommerce shop page – like I added a field to a product and it shows up on the single product page – but I can’t seem to get it showing up in the shop page.

  • Can’t get it to show on front end or in admin?

    Make sure your field group location settings are “Page is equal to Shop” and in the template file archive-product.php you need to use the page id to fetch the values:

    $page_id = wc_get_page_id( 'shop' );
    $your_field = get_field( 'your_field', $page_id ); 
  • Have the same issue and tried the code above, but its not working. Is ‘shop’ the page slug? I also tried the ID number but that didn’t work either.

    <?php $page_id = wc_get_page_id( 'shop' );
    $your_field = get_field( 'marquee', $page_id );  ?>
  • Anyone looking at old posts or should I submit a new one on the same issue?

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

You must be logged in to reply to this topic.