If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WordPress. How to display the most recent comment on top

This video tutorial shows how to display the most recent comment on top in WordPress templates.

  1. Login to WordPress admin panel, navigate to Settings and click on Discussions.

    WordPress_how_to_display_the_most_recent_comment_on_top-1

  2. Under the Other comment settings you will find the option ‘Comments should be displayed with the older comments at the top of each page’. Click on the drop down menu and select Newer.

    WordPress_how_to_display_the_most_recent_comment_on_top-2

  3. After that, you need to click on the Save Changes button at the bottom of the page, to save your settings.

    WordPress_how_to_display_the_most_recent_comment_on_top-3

  4. Alternative Method

  5. Navigate to Appearance, click on Editor and open custom-function.php file for editing.

    WordPress_how_to_display_the_most_recent_comment_on_top-4

  6. Simply add following code to the bottom of custom-function.php file:

    			function wpb_reverse_comments($comments) {
    			return array_reverse($comments);
    			}	
    			add_filter ('comments_array', 'wpb_reverse_comments');
    		

    When you are done, press the Update File button.

    WordPress_how_to_display_the_most_recent_comment_on_top-5

Feel free to check the detailed video tutorial below:

WordPress. How to display the most recent comment on top