How it works...
WooCommerce uses the custom post type to manage products. The default template for products is the single.php file. However, we can have a different template for each custom post type by using a single-{custom post type}.php file. Once a product has been viewed, WooCommerce loads single-product.php files inside the templates folder of the WooCommerce plugin. This file loads a partial template called content-single-product.php within the templates folder of WooCommerce. We can modify this plugin or entirely replace it with a custom template to change the built-in product page design.
First, we copied the content-single-product.php template from WooCommerce to the woocommerce folder of our Twenty Twenty child theme. Once copied, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access