How to add ACF select filed in single product page builder

This topic has 5 replies, 2 voices, and was last updated 1 years, 4 months ago ago by Rose Tyler

  • Avatar: mohamed aly
    mohamed aly
    Participant
    November 21, 2022 at 10:03

    Hi
    we use single product page builder , we create filed “free return” using ACF then give value to it in vendor product page now we need to know how to display selected value in single product page

    Please, contact administrator
    for this information.
    4 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 21, 2022 at 11:51

    Hello,

    Could you please, provide us screenshots of your work (where did you create the field? and where would you like to output it ? )
    Also, it would be better if you could provide us with ftp access.

    Regards

    Avatar: mohamed aly
    mohamed aly
    Participant
    November 21, 2022 at 12:15

    Hi
    thanks for your replay , pls check ACF create screens https://prnt.sc/VWxhMzZpfIWT then https://prnt.sc/685iCt6SE_h6
    then add value to vendor here https://prnt.sc/s8wF8ntj2fOW
    want set the value here https://prnt.sc/1K3pPgQyjPZQ
    thanks in advance

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 21, 2022 at 14:35

    Hello,

    Another specialist will get back to you after a detailed review. Please be patient

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 21, 2022 at 15:24

    Hello,

    We’ve added code in functions.php of child theme – https://prnt.sc/frgyBlyN81cK

    add_action( 'etheme_woocommerce_template_single_excerpt', function() {
    global $product;
    if ( function_exists('get_field')) {
    $value = get_field( 'free_return', $product->get_id() );
    if ( $value ) {
    echo '<p>' . $value . '</p>';
    }
    }
    }, 5 );

    Clear cache and check now.

    Regards

  • Viewing 5 results - 1 through 5 (of 5 total)

The issue related to '‘how to add ACF select filed in single product page builder’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.