I don't know why but when I want to display the posts with comment opened, it shows posts which are among the last 10 posts (depend how much is in READING menu), so posts which are in the first page.
My code :
<?php
// The Query
query_posts( $args );
// The Loop
while ( have_posts() ) : the_post(); ?>
<?php
$PostID = get_the_ID();
if (comments_open( $post_id )) { ?>
<?php p2_load_entry(); ?>
<?php } ?>
<?php endwhile;
// Reset Query
wp_reset_query();
?>
This is my file :
<?php
/**
* Static page template.
Template Name: test
*
* @package P2
*/
?>
<?php get_header(); ?>
<ul id="postlist">
<?php
query_posts( $args );
while ( have_posts() ) : the_post(); ?>
<?php
$PostID = get_the_ID();
if (comments_open( $post_id )) { ?><?php p2_load_entry(); ?>
<?php } ?>
<?php endwhile;
wp_reset_query();
?>
</ul>
<?php get_footer(); ?>