Support » Plugins » Comments Posting to Random Posts

  • AJ Troxell


    I am using WP 2.7 and am having an issue with comments posting to a random post other than the one it should be posted to. I have isolated the code that is causing this error, but an unaware on how to fix it.
    I am using the following code to display the latest “x” posts on the side of my single pages.

    <div id="rightCon">
    <p class="projectStatus">Other Posts</p><br />
      <?php $recent = new WP_Query("showposts=3&cat=-8"); while($recent->have_posts()) : $recent->the_post();?>
        <span class="archive-header"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title() ?></a></span>
    <?php echo get_the_image_link(array('thumbnail','thumbnail-news'),'thumbnail'); ?><br />
    <span class="postmetadata"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">Read more...</a></span><br /><br />
      <?php endwhile; ?>

    I know this is the issue, because with it removed the problem does not occur. I cannot, however, find out how to prevent this from happening, without having to remove this from my single.php template.

    Any ideas?
    I know it is probably something simple that I am missing.

  • The topic ‘Comments Posting to Random Posts’ is closed to new replies.