Weird comments behavior after using WP_query()
-
so.. i modified my single.php file to show the latest five post in that category this way:
<?php $my_query = new WP_Query('cat=' . $numero. '&showposts=5'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Link Permanente a <?php the_title_attribute(); ?>"><?php the_title(); ?></a> <?php endwhile; ?>
that code is after the loop and before the comments.
And now the comments in one post appear in other posts.. haha…
the problem, i guest, is in this line:
$my_query = new WP_Query(‘cat=’ . $numero. ‘&showposts=5’);Help, please ??
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Weird comments behavior after using WP_query()’ is closed to new replies.