Reputation: 36
I'm trying to customize the archive-product page, and it works perfectly while I'm on my local server, but when I move it online, it's switches back to the default template. I'm trying to fix this for a week now, I've read all the other answers regarding this issue, but most of them are for an older version of woocommerce or the solution just doesn't work.
As a last refugee from madness, I've deleted all the archive-product.php file I can find, even the one in the woocommerce source folder, but nothing changed, I don't know where the site is getting the template from. The page have become self aware and I am going crazy because I have no idea what to do next.
Here is the difference between the page on local and online server
Upvotes: 1
Views: 809
Reputation: 29
Please check if you have this in your functions.php, if not add:
add_theme_support( 'woocommerce' );
In theme root folder, add the file woocommerce.php
and in that file set your own layout. For example:
<div class="wrapper">
<div class="sidebar">
// sidebar
</div>
<div class="inner">
<?php if ( have_posts() ) :
while(have_posts()) : the_post();
<?php woocommerce_content(); ?>
<?php
endwhile;
endif;?>
</div>
</div>
For more details: go through https://docs.woothemes.com/document/third-party-custom-theme-compatibility/
Upvotes: 2