• Resolved extatix

    (@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:

    <ul>
    <?php $cuery =  new WP_query('posts_per_page=10');
    while ( $cuery->have_posts()) : $cuery->the_post(); ?>
    <li>
    do stuff
    </li>
    <?php endwhile; ?>
    </ul>
    [ content from single ]
    MY CODE
    <?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.