How to edit the product pages?

Hi,

I’m trying to work out how to edit the WooCommerce product pages. What template do I edit? Looking in single.php all I see is:

<?php x_get_view( x_get_stack(), 'wp', 'single' ); ?>

But that is useless to me. Where do I find the theme file for the products page in WooCommerce?

Thanks

Steve

Hi @steveraf,

Thanks for reaching out.

What you wish to customized is part of Woocommerce which templates should be customized and placed through /pro-child/woocommerce/ or /x-child/woocommerce/ folder. Hence, you can also copy some files from main theme’s /woocommerce/ folder, or plugin’s /wp-content/plugins/woocommerce/templates/ folder to your child theme’s /woocommerce/ folder.

Please check https://docs.woocommerce.com/document/template-structure/. And you can also check other Woocommerce documentation related to template customization.

Thanks!

Thanks for the reply. I’m a bit confused as to what I should edit though. In /wp-content/plugins/woocommerce/templates/single-product.php

I’m adding some test debug in there, then clearing out our W3TotalCache caches, but I don’t see any of my debug :confused:

Typical - I just worked it out! Its not single-product.php I want - but content-single-product.php :slight_smile:

Hello There @steveraf

Thanks for writing in! By default, there is no content-single-product.php file in the theme. We only use the default WooCommerce template wrapper which is the woocommerce.php.

If you need to modify the content-single.product.php file, please do this:

Then you can customize your file in the child theme.

For more details in modifying WooCommerce templates, please check this out: https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-codex/theming/

Hope that helps.
Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.