In this Tutorial, I will explain how to change the product placeholder image in WooCommerce based online store. By replacing the default product placeholder image with your own brand placeholder image improve your Branding credibility.
Related Articles
How to Change the Product Placeholder Image in WooCommerce
Copy the below code and add at the end of the functions.php file from current theme’s folder.
add_action( 'init', 'custom_fix_thumbnail' ); function custom_fix_thumbnail() { add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); function custom_woocommerce_placeholder_img_src( $src ) { $upload_dir = wp_upload_dir(); $uploads = untrailingslashit( $upload_dir['baseurl'] ); $src = $uploads . '/2012/07/thumb1.jpg'; return $src; } }
Conclusion
I hope this tutorial helps you, if you have any questions regarding WordPress, then feel free to put your comments in below comment section. Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.
The post How to Change the Product Placeholder Image in Woocommerce appeared first on FreeWebMentor.
This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here