• Resolved Jellelle

    (@jellelle)


    Hi folks,

    I want to list an archive for all the posts in a specific category.

    That works, but the problem is that the comments of the last post in the list are visible. Hows that posible? I just want a simple list.

    Here’s the code I use:

    <?php
     $postslist = get_posts('$category=1&numberposts=2&orderby=post_date');
     foreach ($postslist as $post) :
        setup_postdata($post);
     ?>
     <div>
     <?php the_date(); ?>
     <br />
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
     <?php the_excerpt(); ?>
     </div>
     <?php endforeach; ?>

    <?php comments_template(); ?> is not in the index.php file, but in sidebar.php file, if that matters.

    Thanks a lot!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get_posts(‘arguments’) shows comments of post at the bottom of the list’ is closed to new replies.