How to Customize the WooCommerce Product Page (Block and Classic Themes)
Most product pages start as the theme's default: a gallery, a title, a price and a button. Changing them is easy once you know which system draws the page on your store, because block themes, classic themes and page builders each do it differently. Here is how to change each, safely.
In this article
Key takeaways
- Block themes: edit the Single Product template in the Site Editor, for every product or for just one.
- Classic themes: move parts with the woocommerce_single_product_summary hook; Add to cart sits at priority 30.
- Override template files only as copies in a child theme; System Status flags copies that fall out of date.
- If Elementor Pro or Divi has a product template, it wins: edit it there.
- WooCommerce adds Product structured data itself (priority 60): keep it when you change the template.
The short answer
| Your store uses | Change the product page in | Code needed? |
|---|---|---|
| A block theme | The Site Editor: the Single Product template, or a template for one product | No |
| A classic theme | WooCommerce hooks in a code snippet, or a template copy in a child theme | A few lines |
| Elementor Pro or Divi product templates | The page builder’s Theme Builder | No |
Not sure which you have? Under Appearance, block themes usually show Editor (the Site Editor), while classic themes show Customize. Then check whether a page builder has a product template assigned.
1. Block themes: edit the Single Product template
WooCommerce’s store editing guide: on a block theme, use the Site Editor to change the layout of your product pages. You can edit the shared Single Product template, or create a template for one product.
- Go to Appearance → Editor → Templates and open Single Product.
- The gallery, title, price, Add to cart, description and related products are separate blocks. Move, restyle or remove them like any other block.
- Add your own blocks, such as delivery and returns details next to Add to cart, or a reviews section.
- Save. The change applies to every product that uses this template.
To give one product its own layout, add a new template for that product in the Site Editor instead of changing the shared one.
2. Classic themes: move things with hooks
On classic themes the page is built from template files that call actions in order. These are the main ones in WooCommerce’s single product template, with the functions hooked to them and their priorities (lower runs first):
| Hook | What it outputs (priority) |
|---|---|
woocommerce_before_single_product_summary | Sale badge (10), product images (20) |
woocommerce_single_product_summary | Title (5), rating (10), price (10), short description (20), Add to cart (30), product meta (40), sharing (50), structured data (60) |
woocommerce_after_single_product_summary | Description tabs (10), upsells (15), related products (20) |
To move something, remove it and add it back at a new priority. For example, put the price under Add to cart, add a delivery note right after the button, and drop the related products:
// Price after Add to cart (30) instead of before it.
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 35 );
// A short note right after the button.
add_action( 'woocommerce_single_product_summary', function () {
echo '<p class="product-delivery-note">Ships in 2 to 3 working days.</p>';
}, 31 );
// No related products.
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );Add code with a code snippets plugin or in a child theme. Some themes change these hooks; if a change doesn’t show, check the theme’s own WooCommerce settings first.
3. Override the template file, as a last resort
For bigger changes on a classic theme you can copy a template, such as single-product.php or content-single-product.php, from wp-content/plugins/woocommerce/templates/ into a woocommerce folder in your child theme, and edit the copy.
- Never edit the files inside the WooCommerce plugin: updates replace them.
- Your copy doesn’t update when WooCommerce does. WooCommerce’s System Status report warns when a copy is out of date, and old copies can miss fixes.
- Prefer hooks for small changes; keep overrides for real layout changes.
4. Page builders
Elementor Pro and Divi each have a Theme Builder that can take over the WooCommerce product template. If one is assigned to products, it wins: changes in the Site Editor or in hook code may not show on the product page. Check the builder’s templates and display conditions first, and make the change there.
What to change first
- Larger, sharper images and a gallery that works with a thumb on a phone.
- The price and options above the fold, with variations that are easy to choose.
- Delivery, returns and stock next to Add to cart, so shoppers don’t hunt for them.
- Reviews where shoppers see them, not three tabs down.
- Related products that are actually related, or none at all.
- Shipment updates after the sale: see shipment tracking emails.
Keep the product structured data
WooCommerce adds Product structured data (price, availability, reviews) to every product page through the same summary hook, at priority 60. If you remove that hook’s output or replace the whole template, check the page still has it in Google’s Rich Results Test. Our guide to schema markup in WordPress covers testing.
Where WPOS fits
WPOS restyles the WooCommerce product page from chat, without editing the theme’s files. It checks whether a block template, Elementor Pro or Divi controls the page first, keeps every style scoped to the store, and checks the result on the live page. In WPOS’s own demo the request was:
“Restyle the single product page: a larger gallery, trust badges under Add to cart, related products in 4 columns.”
WPOS is our product, so weigh this section accordingly; you can try it free for 30 days with 5,000 credits, a live site plus a staging sandbox, and no card.
Frequently Asked Questions
On a block theme, edit the Single Product template in the Site Editor, for all products or for one. On a classic theme, move or add parts with WooCommerce's hooks, or override the template in a child theme. If Elementor Pro or Divi has a product template, edit it there.
Yes, on a block theme: the Site Editor lets you rearrange the product page blocks visually. On a classic theme, a page builder's product template or a plugin is the no-code route; otherwise small changes need a few lines in a code snippet.
On a block theme, WooCommerce lets you create a template for a single product in the Site Editor, alongside the shared Single Product template. On a classic theme, use a conditional check on the product in your hook code, or your page builder's display conditions.
On a classic theme, remove the function from the woocommerce_single_product_summary hook and add it back at a new priority. The title is at 5, rating and price at 10, the short description at 20, Add to cart at 30 and the product meta at 40.
Only as copies in a child theme, never in the WooCommerce plugin. Copies don't update with WooCommerce, so the System Status report warns when one is out of date. Prefer hooks, which keep working across updates.
It can. WooCommerce adds Product structured data to product pages by itself. If you remove its hooks or replace the template, check the page still has it in Google's Rich Results Test.
Start free with 15,000 credits.
Three times the usual 5,000, no card needed. Then 50% off your site licences for 2 months with FRIDAY50.
Better product pages, without touching theme files.
WPOS puts an AI agent inside wp-admin on the sites you already run, on any host, and it checks its own work. Free for 30 days: 5,000 credits, a live site plus a sandbox, no card.