Support

Account

Home Forums Front-end Issues Display field of product on category/archive

Unread

Display field of product on category/archive

  • Hi there,

    I am desperately trying to display some extra fiels on the product cards of category/archive pages, like is being done here:
    https://wwww.waaiersbedrukken.nl

    First of all the question: Can I put code related to WooCommerce in my child-theme functions file?

    I have been experimenting and here is my end result:

    /**ACF FIELD
    add_action( ‘woocommerce_after_shop_loop_item’, ‘acf_velden’, 10 );

    function acf_velden() {

    if( get_field(‘drukopties’) ):
    echo ‘<p>Drukopties:’ get_field(‘drukopties’) .'</p>’;
    }

    The field ‘drukopties’ is a checkbox which has to be filled in from the backend and needs to display the checked values on front end.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.