Support » Fixing WordPress » Loop within a loop – comments problem

  • Resolved extatix


    So I’ve build a piece of code which shows the last 10 posts between the main content of a post (single) and the comments. Problem is: the comments are based on the last post from my code. How do I fix this?

    I use this piece of code:

    <?php $cuery =  new WP_query('posts_per_page=10');
    while ( $cuery->have_posts()) : $cuery->the_post(); ?>
    do stuff
    <?php endwhile; ?>
    [ content from single ]
    <?php comments_template('', true); ?>
    [endwhile; endif;]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Loop within a loop – comments problem’ is closed to new replies.