[wp-trac] [WordPress Trac] #29462: comment pagination in reverse order should display a full number of the latest comments
WordPress Trac
noreply at wordpress.org
Wed Feb 20 18:50:39 UTC 2019
#29462: comment pagination in reverse order should display a full number of the
latest comments
--------------------------+-----------------------------
Reporter: mark-k | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Comments | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by juslintek):
Okay I figured this out. Why not use: **comments_template_query_args**
filter hook, for overriding default params. Ofcourse this could have UI in
wp-admin for controlling all these settings, inside site/web/wp/wp-
includes/comment-template.php handler. And if you're building your own
comments handler then I thinks its not core anymore. I've added this code
to my theme and pagination and permalinks still work and manage to resolve
to the page of the comment:
{{{#!php
<?php
add_filter('comments_template_query_args', function($comment_args) {
$comment_args['order'] = 'DESC';
return $comment_args;
});
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29462#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list