I wanted to make a separate Woocommerce shop page as a template in my theme.

So I made special-shop.php as a template file as specified by the docs by having this snippet of code in the comments block:

<?php 
/**
 * Template Name: Special Shop
 *
 * @package WpTheme
 */

Then I copied and pasted all the code from archive-product.php (the file that Woocommerce shop page usually runs) into special-shop.php.

However, when I apply this template to a newly created wordpress page, the page itself will not appear just like the main woocommerce shop page. The styling is off. The right classes aren’t attributed to the body element and etc.

Are there some Woocommerce specific hooks that special-shop.php is not getting that has to do with attribution of classes?

I even copied the

get_header( 'shop' );

with no luck.

Read more here: Separate Woocommerce Shop Pages


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: