Title: Pages and posts displaying same post
Last modified: August 22, 2016

---

# Pages and posts displaying same post

 *  Resolved [Jelly92](https://wordpress.org/support/users/jelly92/)
 * (@jelly92)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/pages-and-posts-displaying-same-post/)
 * Sorry about the title. This is a little confusing.
 * I recently altered my index page so the home page should only display the most
   recent post. Here’s some code:
 *     ```
       <div class="post">
       		<?php query_posts('showposts=1'); if (have_posts()) : while (have_posts()) : the_post();?>
       		<h2><?php the_title(); ?></h2>
       		<h4>Posted on <?php the_time('F jS, Y') ?></h4>
       		<p><?php the_content(__('(more...)')); ?></p>
       		<?php endwhile; else: ?>
       		<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
       		<?php endif; wp_reset_query(); ?>
       	</div>
       ```
   
 * It works fine, but now, if I go to the page for a different post or a test page
   I made, they are ALL displaying THAT post.
 * Oh, this is offline, by the way.
 * Help? 🙁

The topic ‘Pages and posts displaying same post’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [Jelly92](https://wordpress.org/support/users/jelly92/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/pages-and-posts-displaying-same-post/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
