{"id":75030,"date":"2016-08-29T09:57:06","date_gmt":"2016-08-29T13:57:06","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=75030"},"modified":"2017-07-24T06:12:12","modified_gmt":"2017-07-24T10:12:12","slug":"wordpress-display-recent-comment-top","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-display-recent-comment-top.html","title":{"rendered":"WordPress. How to display the most recent comment on top"},"content":{"rendered":"<p>This video tutorial shows how to <strong> display the most recent comment on top in WordPress templates. <\/strong> <\/p>\r\n\r\n <div class=\"video-container\">\r\n\t<iframe src=\"https:\/\/www.youtube.com\/embed\/zAXbUXW4juk\"><\/iframe>\r\n<\/div>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/service-center\/\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-3-(835-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>\r\n<ol>\r\n\t<li>\r\n\t\t<p>Login to WordPress admin panel, navigate to <strong>Settings<\/strong> and click on <strong>Discussions<\/strong>.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1-300x165.png\" alt=\"WordPress_how_to_display_the_most_recent_comment_on_top-1\" width=\"300\" height=\"165\" class=\"alignnone size-medium wp-image-75031\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1-300x165.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1-150x82.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1-768x422.png 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1-1024x563.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-1.png 1262w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li> \r\n\t\r\n\t<li>\r\n\t\t<p>Under the <strong>Other comment settings<\/strong> you will find the option <em>&#8216;Comments should be displayed with the older comments at the top of each page&#8217;<\/em>. Click on the drop down menu and select  <strong> Newer. <\/strong> <\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2-300x161.png\" alt=\"WordPress_how_to_display_the_most_recent_comment_on_top-2\" width=\"300\" height=\"161\" class=\"alignnone size-medium wp-image-75032\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2-300x161.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2-150x80.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2-768x412.png 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2-1024x549.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-2.png 1271w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\r\n\t\r\n\t<li>\r\n\t\t<p>After that, you need to click on the <strong>Save Changes <\/strong> button at the bottom of the page, to save your settings. <\/p> \r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3-300x163.png\" alt=\"WordPress_how_to_display_the_most_recent_comment_on_top-3\" width=\"300\" height=\"163\" class=\"alignnone size-medium wp-image-75033\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3-300x163.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3-150x81.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3-768x416.png 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3-1024x555.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-3.png 1271w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\r\n\t\r\n    <h3>Alternative Method<\/h3>\r\n\t\r\n    <li>\r\n\t\t<p>Navigate to <strong>Appearance<\/strong>, click on <strong>Editor<\/strong> and open <strong> custom-function.php <\/strong> file for editing.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4-300x157.png\" alt=\"WordPress_how_to_display_the_most_recent_comment_on_top-4\" width=\"300\" height=\"157\" class=\"alignnone size-medium wp-image-75034\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4-300x157.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4-150x79.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4-768x402.png 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4-1024x536.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-4.png 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\r\n\t\r\n    <li>\r\n\t\t<p>Simply add following code to the bottom of <strong>custom-function.php <\/strong> file:<\/p>\r\n\t\t<pre>\r\n\t\t\tfunction wpb_reverse_comments($comments) {\r\n\t\t\treturn array_reverse($comments);\r\n\t\t\t}\t\r\n\t\t\tadd_filter ('comments_array', 'wpb_reverse_comments');\r\n\t\t<\/pre>\r\n\t\t\r\n\t\t<p>When you are done, press the <strong>Update File<\/strong> button.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5-300x162.png\" alt=\"WordPress_how_to_display_the_most_recent_comment_on_top-5\" width=\"300\" height=\"162\" class=\"alignnone size-medium wp-image-75035\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5-300x162.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5-150x81.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5-768x414.png 768w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5-1024x552.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/08\/WordPress_how_to_display_the_most_recent_comment_on_top-5.png 1272w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\t<\/li>\t\t\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=zAXbUXW4juk?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to display the most recent comment on top<\/a>","protected":false},"excerpt":{"rendered":"<p>This video tutorial shows how to <strong> display the most recent comment on top in WordPress templates. <\/strong> <\/p>\n","protected":false},"author":73,"featured_media":75036,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[1331,684,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/75030"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/73"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=75030"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/75030\/revisions"}],"predecessor-version":[{"id":82170,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/75030\/revisions\/82170"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/75036"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=75030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=75030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=75030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}