Title: Single.php showing all posts?
Last modified: August 19, 2016

---

# Single.php showing all posts?

 *  [MatthewRuddy](https://wordpress.org/support/users/matthewruddy/)
 * (@matthewruddy)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/singlephp-showing-all-posts-1/)
 * For some reason my page single.php is showing all the post from a category instead
   of just a single post! I cannot figure out why this is at all. Am I missing some
   code?
 * `<?php get_header(); ?>
    <div id="container"> <?php if(have_posts()) : ?> <?php
   while(have_posts()) : the_post(); ?> <h2><?php the_title(); ?></h2> <?php the_content();?
   > <?php endwhile; ?> <?php endif; ?> </div> <?php get_footer(); ?>
 * The post in question: [http://easingslider.matthewruddy.com/screenshots](http://easingslider.matthewruddy.com/screenshots).
 * I want it to display the screenshots post but instead it is displaying all the
   posts from that category. Really would appreciate if anyone could help me fix
   this.. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Yoris](https://wordpress.org/support/users/yoris/)
 * (@yoris)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/singlephp-showing-all-posts-1/#post-1607571)
 * I think it might be in the link you’re using.
 * I would expect a link to a single post to look like this:
    [http://easingslider.matthewruddy.com/category-name/post-title](http://easingslider.matthewruddy.com/category-name/post-title)
 * You could test this by making your post titles into links, to see what link you
   get then.
    `<h4><a href=”<?php the_permalink(); ?>“><?php the_title(); ?></a>
   </h4>`
 *  Thread Starter [MatthewRuddy](https://wordpress.org/support/users/matthewruddy/)
 * (@matthewruddy)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/singlephp-showing-all-posts-1/#post-1607644)
 * Tried that, no luck.
 * Try it yourself : [http://easingslider.matthewruddy.com](http://easingslider.matthewruddy.com);
   the title links just link to a page displaying all the posts..
 *  [Yoris](https://wordpress.org/support/users/yoris/)
 * (@yoris)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/singlephp-showing-all-posts-1/#post-1607679)
 * I don’t know what you did, but [http://easingslider.matthewruddy.com/screenshots](http://easingslider.matthewruddy.com/screenshots)
   seems to be displaying only the screenshots now. So I guess it’s working…
    Did
   you figure out what was wrong?
 *  Thread Starter [MatthewRuddy](https://wordpress.org/support/users/matthewruddy/)
 * (@matthewruddy)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/singlephp-showing-all-posts-1/#post-1607692)
 * Yeah. I had used;
 *  `<?php if(have_posts()) : ?>
    <?php while(have_posts()) : the_post(); ?></code
 * in the header as a navigation (displaying only the titles) which seemed to break
   things. Fixed it now though.
 * Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Single.php showing all posts?’ is closed to new replies.

## Tags

 * [custom theme](https://wordpress.org/support/topic-tag/custom-theme/)
 * [single](https://wordpress.org/support/topic-tag/single/)

 * 4 replies
 * 2 participants
 * Last reply from: [MatthewRuddy](https://wordpress.org/support/users/matthewruddy/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/singlephp-showing-all-posts-1/#post-1607692)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
