I have a template set up and I've created a page in WordPress and have chosen the corresponding template in the drop down. I have created templates for several pages of this site and they've all worked fine; however, this one template is causing problems. WordPress keeps fetching the archive page for some reason. The exact body class is this: archive post-type-archive post-type-archive-teams logged-in
Here is the template I've created.
<?php get_header();?>
<section id="content">
<?php
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query('post_type=teams&posts_per_page=7');
while ( $wp_query->have_posts() ) : $wp_query->the_post();
?>
<article class="post team" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<section class="entry">
content here
</section>
</article>
<?php
endwhile;
$wp_query = null;
$wp_query = $temp;
wp_reset_query();
?>
</section>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Can someone help me out in figuring out why this isn't working?
<?php /* Template Name: Teams */ ?>
in the first few lines. The file name of the page template isteams.php
. I have tried renaming the file as well as the name of the template in the first few lines but no dice...