New Page (wordpress) keeps using WooCommerce template

I created my wordpress website (pages only) then installed WooCommerce. Everything is fine EXCEPT for some strange reason my Site Map page was coming up blank even though I was seeing the content in the admin. I trashed it and re-created it but it’s still blank.

Now the strange thing is when I view the source I see the WooCommerce classes in the body tag and I even see the tags <h1 class="page-title">Store</h1>' and '<ul class="products">.

I can’t seem to figure it out?

Can you please explain how did you prepare the sitemap? I will able to answer your query further.

Hi Elizine. Thanks for your help! Originally I had created the site map page along with all the other “Pages” on the site through Pages >> Add New. Then I added the page to the footer menu that I created through the menu setup in Appearances. After I installed and set up WooCommerce, I noticed, as I was clicking through all of the pages, that the Site Map page was blank. And at the time I thought it was odd that the link was now /site-map/ was now /site-map-2. After some investigation I found that site-map was in the trash (I don’t remember trashing it.) Do I deleted both version and recreated it again through Pages >> Add New. I re-added the content, selected the template "full-width(no sidebar). Then add a Featured Image and click update. Previewing the page shows the proper template but its has no content. If I click “Edit Page” and go back to the admin, is still see the content I added.

Hey! I JUST DISCOVERED while answering your question that if I select the Default layout then the content DOES appear (no feature image though and the sidebar is presesnt). So what could it be about selecting the full-width template that makes the WooCommerce template take over.

More Info. I set the WooCommerce Settings/Products/Display/ to the page Store that I created in pages (instead of the SHOP default). Also, on another post I got help getting the woocommerce content to fit into my themes full-width template by using a short code (I cant find that post, it might be on another board.)

Does any of that help? I guess the culprit is that my theme’s full-width template has been taken over by Woo.

Thanks again for any help!

So the code (the content section) for my regular WordPress Pages for page-fullwidth.php in my child theme is

<div class="top-section"></div>
	<div id="primary" class="content-area col-sm-12 col-md-12">
		<main id="main" class="site-main" role="main">

			<?php while ( have_posts() ) : the_post(); ?>

			<?php get_template_part( 'content', 'page' ); ?>

			<?php
				// If comments are open or we have at least one comment, load up the comment template
				if ( comments_open() || '0' != get_comments_number() ) :
					comments_template();
				endif;
			?>

		<?php endwhile; // end of the loop. ?>

	</main><!-- #main -->
</div><!-- #primary -->

<?php get_footer(); ?>

and the code for the woocommmerce.php file in my child theme which wraps the woocommmerce page in my full width page is

<div id="featureImg" style="background-image: url('http://dev.tdfinternational.net/wp-content/uploads/2015/09/home_off.jpg')">

</div>



<div id="content" class="site-content container">

<div class="top-section"></div>
	<div id="primary" class="content-area col-sm-12 col-md-12">
		<main id="main" class="site-main" role="main">

			<?php woocommerce_content(); ?>

		</main><!-- #main -->
	</div><!-- #primary -->

<?php get_footer(); ?>

So why is a new page (or just this site-map page) create din Wordpress appear to be using this woocommerce.php file instead of the Wordpress page-fullwidth.php file

I just created a new page (named it “new page”) and when I select the layout “full-width(no sidebar)” and preview it, it’s that same blank page with the class “page-template-woocommerce” in the body tag.

Found it! So simple. So when duplicated my full-page(no sidebar) template, renamed it woocommerce.php and added the woocommerce shortcode to it, I didn’t realize that I needed to change the name of the template in the comments in the php code “Template Name: Full-width(no sidebar)” . So then there were two templates with the same name. I change the name of woocommerce one and now it all works properly again!

1 Like

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