[wp-trac] [WordPress Trac] #35402: per_page parameter no longer works in wp_list_comments
WordPress Trac
noreply at wordpress.org
Thu Jan 14 03:07:35 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 boonebgorges):
Replying to [comment:10 Ninos Ego]:
> Oh I'm sorry. Inside this loop I'm calling:
Ah great, this makes more sense.
I guess the problem here is the `is_singular()` check here:
https://core.trac.wordpress.org/browser/trunk/src/wp-includes/comment-
template.php?marks=1931#L1926 I originally put that check in, thinking
that a `singular` page would be the only place where `get_query_var()`
would return meaningful values for 'cpage' and 'comments_per_page'. But I
guess maybe that restriction doesn't matter, because if meaningful values
are not found, then a new query will be forced in any case.
Can you verify that `is_singular()` is the culprit? Change the line in
question to the following:
{{{
if ($r['page'] || $r['per_page'] ) {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35402#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list