[wp-trac] [WordPress Trac] #35402: per_page parameter no longer works in wp_list_comments
WordPress Trac
noreply at wordpress.org
Wed Jan 13 17:24:21 UTC 2016
#35402: per_page parameter no longer works in wp_list_comments
--------------------------+-----------------------
Reporter: Ninos Ego | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4.2
Component: Comments | Version: 4.4.1
Severity: major | Resolution:
Keywords: | Focuses: template
--------------------------+-----------------------
Comment (by Ninos Ego):
Oh I'm sorry. Inside this loop I'm calling:
{{{#!php
<?php
get_template_part( 'templates/content', 'comment' );
}}}
The template file templates/content-comment.php has following content:
{{{#!php
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
} ?>
<?php global $withcomments; ?>
<?php $withcomments = 1; ?>
<?php add_filter( 'comments_template', '__return_true' ); ?>
<?php if ( comments_open() || get_comments_number() ) : ?>
<div class="entry-comment">
<?php comments_template( '/comments-content.php' ); ?>
</div>
<?php endif; ?>
}}}
And comments-content.php has following part:
{{{#!php
<?php
wp_list_comments( array(
'page' => $cpaged,
'per_page' => 2
) );
?>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35402#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list