Add WooCommerce Product Images Using WP Custom Fields

This code enables you to add your own custom image for each product. If no custom image is added, the placeholder image from Woocommerce is displayed as seen in the following video :

Watch Demo Video #

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

This solution enables you to use WordPress custom fields to add a unique product image rather than use the product image meta box or the default placeholder image. If none added, the default placeholder is shown.

Installation #

There’s 2 steps :

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

Register or login to access the download folder :

Download Folder

Step 2 : Create a new custom field named wc_product_image add your image link as seen in the following screenshot :

Related Tutorials

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.