• 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

    (@johnnywhee)

    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.

    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.