Add WooCommerce Product Images Using ACF

This code enables you to add product images using Advanced Custom Fields. You can add a unique product image on any Edit Product screen using ACF.

Watch Demo Video #

Tested using the Lifestyle Pro child theme by StudioPress however will work in any Genesis child theme or non Genesis theme.

Displays your image as the product image when added on the Edit Product screen using the ACF image field. When none added, displays the placeholder image.

Installation #

There’s 2 steps :

Step 1 : Add the PHP code from the download folder to the end of your child themes functions file .

Register or login to access the download folder :

Download Folder

Step 2 : Using ACF ( Free or Premium version ), create a new field named wc_product_image using the settings you see in the following screenshot :

Related Tutorials


Comments

2 responses to “Add WooCommerce Product Images Using ACF”

  1. Chris Martin Avatar
    Chris Martin

    So if I remove the product image a placeholder shows up. Great! But if I upload an image as a product image using the new ACF, nothing changes.

    1. You need to use a different snippet for this ( link in the related tutorials at the end of the post ) as they are similar but slightly different.

      I’ve sent you the correct snippet installed in a fresh version of your theme which i tested and it does exactly what you want it to do. The other snippet replaces the placeholder image not the default product image on the single product page.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.