[wp-trac] [WordPress Trac] #35402: per_page parameter no longer works in wp_list_comments

WordPress Trac noreply at wordpress.org
Wed Jan 13 13:48:58 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 nphaskins):

 @boonebgorges sure thing. I've had comment threading on the entire time
 and have not turned it off. We use the comment tables in WordPress as a
 "questions and answers" feature.

 This is the simplest version of what I show as failing. I am not using
 this within the loop, but instead it's being called outside in a different
 area. Both get_comments and wp_comment_query produce the same results.

 {{{
 $comments = get_comments( array(  'status' => 'approve' ) );
 wp_list_comments( array( 'per_page' => 5 ), $comments );
 }}}

 With the per_page param set, only 1 comment is displayed, however the
 comment object itself is correct with showing all comments. When I remove
 the per_page param, it then respects what's set under discussion settings.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35402#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list