Woocommerce shop page custom template

Woocommerce shop page custom template

  1. Blog
  2. 15 November 2026
  3. 4 min read

Stefan Bogdanescu

Founder & Senior Architect

The Template Hierarchy Trap in WooCommerce Shop Pages

A common point of confusion when customizing a WooCommerce store involves distinguishing between the "Shop Page" and the "Product Archive." These two concepts often share the same URL, but they render using fundamentally different template priorities. If you attempt to override the look and feel of your shop by assigning a custom page template to the settings-defined Shop Page, it is highly likely that the changes will not appear as expected. This happens because WooCommerce bypasses the standard theme hierarchy for this specific view in favor of its own archive logic.

By default, the "Shop" page displayed at /shop is rendered using archive-product.php. This file lives in your active theme's woocommerce/ directory. When you navigate to WooCommerce > Settings > Products > Display, and select a static page to serve as the Shop page, WooCommerce does not simply switch to the template assigned to that page (e.g., my-shop.php). Instead, it continues to render archive-product.php. Consequently, any modifications made to your custom "My shop" template are ignored because the system never loads that file for this specific route.

To understand why this behavior exists, one must look at how WordPress handles archives versus singular views. WooCommerce treats product listings as archives of a post type (product). Even if you assign a static page to the setting, the URL structure and the query variables often remain indicative of an archive context. The framework prioritizes the specific woocommerce/ templates over the standard page-{slug}.php or custom my-shop.php files found in the root theme directory.

Disabling the Product Archive Template

If your goal is to use a completely unique layout that does not rely on WooCommerce's archive structure, you have two primary technical paths: overriding the template file directly or switching to a singular view approach.

The most direct method to achieve a custom design without relying on archive-product.php is to copy the default file into your theme and modify it. Locate woocommerce/archive-product.php in your active theme folder. Rename this file to match your desired template name, such as my-shop.php. Once renamed, you can edit the content within this specific file to reflect your custom layout.

However, simply renaming the file isn't enough if you want to bypass the archive logic entirely while keeping the standard page header and footer. A more robust approach involves creating a dedicated page in WordPress:

  1. Create a new page titled "My Shop".
  2. Assign the my-shop.php template (created by copying and renaming archive-product.php) to this page.
  3. Go to WooCommerce > Settings > Products > Display and set "Shop" to your new "My Shop" page.

This configuration works because the renamed file now sits in the correct location within the theme hierarchy, overriding the default archive-product.php. When WooCommerce detects that you have provided a custom template with the matching logic or filename, it utilizes it. However, note that if you simply assign a generic page-my-shop.php template without copying the archive logic, you will likely lose essential product display elements like the grid layout, sorting options, and pagination unless you manually rebuild them in your custom file.

The "Singular" Alternative

If you prefer not to deal with archive-specific functions, you can force the shop page to behave like a singular product view rather than an archive. This is achieved by creating a custom template named woocommerce/single-product.php and ensuring it contains the necessary logic to handle multiple products if needed, or simply displaying a single product if that is your intent. However, for a full shop grid, sticking with a customized version of archive-product.php is usually the cleanest solution.

It is important to remember that changing the template file name from archive-product.php to something else, like my-shop.php, requires you to ensure all internal function calls and comments within the file still align with your intentions. The template hierarchy relies on specific filenames to determine which file to load. If you rename the file but do not update the theme's logic or rely solely on WordPress's automatic lookup, the system may fall back to the default archive template if it cannot find a match for archive-product.php.

Why Not Just Use a Custom Page Template?

The frustration described in the original inquiry stems from expecting WordPress's standard page template selection to apply universally. In standard WordPress, assigning "my-shop" to a page would render that file. In WooCommerce, the framework intercepts the request specifically for product lists and demands an archive-specific context. By renaming the default archive template to your custom name and applying it to your static shop page, you effectively tell the framework: "Use this specific layout for the product archive, even if the URL implies a static page."

This approach offers the flexibility to customize every aspect of the product grid while maintaining compatibility with WooCommerce's core rendering engine. You retain control over the HTML structure, CSS classes, and loops without needing to modify plugin files or rely on complex filters that might break during updates.

Our network