I'm trying to display a list of pages on an archive page. The query I've written is meant to only fetch pages but for some reason it is also displaying one post (from the archive page this is on) amongst the pages.
Can anyone suggest what the issue is?
Thanks in advance.
<?php $page_args = array(
'post_type' => 'page'
); ?>
<?php $page_query = new WP_Query($page_args); ?>
<div class="links_slider">
<a class="slide" href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('links'); ?>
<span><?php the_title(); ?></span>
</a>
<?php while($page_query->have_posts()):$page_query->the_post(); ?>
<a class="slide" href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('links'); ?>
<span><?php the_title(); ?></span>
</a>
<?php endwhile; ?>
</div>