I'm using WooCommerce and it created a page called "Shop" which I've attributed to my custom template "Store" through the "page attributes" module in the dashboard.
<?php
/*
Template Name: Store
*/
?>
<?php get_header();?>
<section id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="article-wrapper">
<span class="top-left-corner"></span>
<span class="top-right-corner"></span>
<article id="post-<?php the_ID(); ?>">
<span class="top-corners"></span>
<h2><?php the_title(); ?></h2>
<section class="entry">
<?php the_content(); ?>
</section>
<span class="bottom-corners"></span>
</article>
<span class="bottom-left-corner"></span>
<span class="bottom-right-corner"></span>
</div>
<?php endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
</section>
<?php get_footer(); ?>
However, for some reason, WordPress keeps fetching the archive
page instead of my custom Store page.
This is what the body
class looks like: <body class="archive post-type-archive post-type-archive-product logged-in woocommerce woocommerce-page infinite-scroll neverending">
I'm aware of the issue that the slug cannot match a custom post type with the same name and I've made sure of that. I don't have any custom post types at all. I've double-checked this by changing the name of the page slug and the custom template to something random and still WordPress pulls the archive
page.
What could be causing this issue?