Title: All posts now the same post? ! see code please&#8230;
Last modified: August 19, 2016

---

# All posts now the same post? ! see code please…

 *  [johnnywhee](https://wordpress.org/support/users/johnnywhee/)
 * (@johnnywhee)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/all-posts-now-the-same-post-see-code-please/)
 * I added the following code to my left sidebar to show an image placed in a category
   for a magazine cover image. It works beautifully, and I can click to see the 
   full size image in its own post – except:
 *     ```
       <?php query_posts('cat=3&showposts=1'); ?>
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   
       <a id="post-<?php the_ID(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php $values = get_post_custom_values("Cover"); echo $values[0]; ?>" class="magcover" /></a>
   
       <?php endwhile; else: ?>
       <?php endif; ?>
       ```
   
 * Now every link I go to for any other post shows the post from above – the full
   size image. Did I close it improperly?
 * Thanks!
 * Sean

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

 *  Thread Starter [johnnywhee](https://wordpress.org/support/users/johnnywhee/)
 * (@johnnywhee)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/all-posts-now-the-same-post-see-code-please/#post-767035)
 * Should mention, if I remove the code, I see the correct posts when going to their
   links.
 * Also Have an issue with clicking on a category – always shows the home page. 
   I recently moved the app to a new directory – so those may be 2 separate issues.
 *  [wp_guy](https://wordpress.org/support/users/wp_guy/)
 * (@wp_guy)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/all-posts-now-the-same-post-see-code-please/#post-767048)
 * Try adding this after your first loop and before the second:
 * `<?php query_posts($querystring); ?>`

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

The topic ‘All posts now the same post? ! see code please…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [wp_guy](https://wordpress.org/support/users/wp_guy/)
 * Last activity: [17 years, 12 months ago](https://wordpress.org/support/topic/all-posts-now-the-same-post-see-code-please/#post-767048)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
