Reverse WordPress Comment Order to Show the Latest on Top


/ Published in: PHP
Save to your folder(s)

place code in functions.php


Copy this code and paste it in your HTML
  1. if (!function_exists('iweb_reverse_comments')) {
  2. function iweb_reverse_comments($comments) {
  3. return array_reverse($comments);
  4. }
  5. }
  6. add_filter ('comments_array', 'iweb_reverse_comments');

URL: http://wpmu.org/daily-tip-how-to-reverse-wordpress-comment-order-to-show-the-latest-on-top/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.