Hi there. A the bottom of a single post, I want to have some links to other posts from a category. So I put this loop in my childtheme_override_single_post() function right before calling thematic_belowpost():
<?php $my_query = new WP_Query('category_name=essays&posts_per_page=5&order=DESC'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php $postid = get_the_ID(); if (!(is_single($postid))) { ?>
<li><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php } ?>
<?php endwhile; ?>
I use the if to prevent the current post from appearing in the loop. The loop then works as I want it to.
THE PROBLEM: When Thematic goes to publish the comments, it gets the comments belonging to the last post from my loop, not of the current single post! For example, at the bottom of the post about apples my loop will deliver posts on bananas and oranges, but then Thematic will present the comments on oranges instead of on apples.
My loop is clearly overwriting a variable used to call the comments. I suspect that it's $post. How do I reset it?