How to show the latest comments first in WordPress
Do you want to show the latest comments first in WordPress?
By default, WordPress first displays older comments. However, you may want to change this setting so that the latest comments appear first.
In this article, we will show you how to easily rearrange comments in WordPress and first show the latest comments.
Why show the latest comments first in WordPress
By default, WordPress displays comments in the order in which comments are posted, so the oldest comments always show first. This means that the first thing visitors see is the oldest comments from the post.
Comments can improve user engagement, but showing outdated comments first is not the best way to spark new conversations.
By showing the latest comments first, you can encourage visitors to join the discussion and keep the conversation going. This is a great way to get more comments on your WordPress blog.
Highlighting the latest reviews can also make your website look fresher, lively and attractive. This can increase WordPress’s comprehensive views and reduce bounce rates.
That being said, let's first look at how to easily display the latest reviews in WordPress. Just use the quick link below to jump to the method you want to use:
- Method 1: First display newer comments in WordPress settings (simple)
- Method 2: Manually set the order of WordPress comments displayed
Method 1: First display newer comments in WordPress settings (simple)
The easiest way to rearrange your comments is to go to Settings » Discussions in your WordPress dashboard.
In another "Other Comment Settings" section, find "Comments should show as..."
The default is "Older Comments at the Top of Each Page", but you can open this drop-down list and select "Newer".
Once you have done this, just scroll to the bottom of the page and click Save Changes to store your settings.
Now, if you visit your WordPress blog, you will see the latest comments first.
Method 2: Manually set the order of WordPress comments displayed
The first method is the easiest, but in some cases the WordPress settings don't work.
For example, you might have created a custom WordPress theme, or you might be developing a multi-author WordPress blog but don't have access to WordPress settings.
In this case, you can first use the code to display the latest comments.
Typically, the tutorial will tell you to add custom code snippets to the theme's functions.php file. However, we do not recommend using this method, as a small error in the code can cause many common WordPress errors and even completely destroy your website.
This is why we recommend using WPCode. This is the easiest and safest way to add code snippets in WordPress without editing any core WordPress files.
The first thing you need to do is install and activate the free WPCode plugin on your website. For more details, see our step-by-step guide on how to install WordPress plug-ins.
Once activated, you need to go to the Code Snippet» Add snippet in the WordPress dashboard.
Here you will see all the different ready-made snippets that you can add to your website. These include snippets of code that allow you to completely disable comments and disable the WordPress admin bar.
Since we want to add our own code snippets, just hover over "Add your custom code" and click "Use code snippets".
First, just enter the title of the custom code snippet. This can be anything that can help you identify snippets of code in your WordPress dashboard.
After that, open the Code Type drop-down list and select PHP Fragment.
Now you can proceed to paste the following code snippet into the code editor:
When you are done, scroll to the top of the screen and click the Inactive toggle button to change it to Active.
Finally, click "Save Fragment".
To make the code snippet take effect on your website, go ahead and click the Inactive slider to make it Active.
Finally, click "Update".
Now, if you visit your WordPress site, you will see the latest reviews at the top of the comments section.
Note that this code will overwrite your WordPress settings. If you want to switch back to displaying the oldest comments first, you need to disable the code snippet.
Just go to Code Snippet » Code Snippet . Here, find the comment clip and click its toggle button to change it from active (blue) to inactive (grey).
We hope this article helps you understand how to display the latest reviews in WordPress. You may also want to check out our guide on how to allow users to sign up on your WordPress website, or check out our expert selection of the best WordPress membership plugins.
The above is the detailed content of How to show the latest comments first in WordPress. For more information, please follow other related articles on the PHP Chinese website!

WordPresspluginssignificantlyenhanceitsCMScapabilitiesbyofferingcustomizationandfunctionality.1)Over50,000pluginsallowuserstotailortheirsiteforSEO,e-commerce,andsecurity.2)Pluginscanextendcorefeatures,likeaddingcustomposttypes.3)However,theycancausec

Yes, WordPress is very suitable for e-commerce. 1) With the WooCommerce plugin, WordPress can quickly become a fully functional online store. 2) Pay attention to performance optimization and security, and regular updates and use of caches and security plug-ins are the key. 3) WordPress provides a wealth of customization options to improve user experience and significantly optimize SEO.

Do you want to connect your website to Yandex Webmaster Tools? Webmaster tools such as Google Search Console, Bing and Yandex can help you optimize your website, monitor traffic, manage robots.txt, check for website errors, and more. In this article, we will share how to add your WordPress website to the Yandex Webmaster Tool to monitor your search engine traffic. What is Yandex? Yandex is a popular search engine based in Russia, similar to Google and Bing. You can excel in Yandex

Do you need to fix HTTP image upload errors in WordPress? This error can be particularly frustrating when you create content in WordPress. This usually happens when you upload images or other files to your CMS using the built-in WordPress media library. In this article, we will show you how to easily fix HTTP image upload errors in WordPress. What is the reason for HTTP errors during WordPress media uploading? When you try to upload files to Wo using WordPress media uploader

Recently, one of our readers reported that the Add Media button on their WordPress site suddenly stopped working. This classic editor problem does not show any errors or warnings, which makes the user unaware why their "Add Media" button does not work. In this article, we will show you how to easily fix the Add Media button in WordPress that doesn't work. What causes WordPress "Add Media" button to stop working? If you are still using the old classic WordPress editor, the Add Media button allows you to insert images, videos, and more into your blog post.

Do you want to know how to use cookies on your WordPress website? Cookies are useful tools for storing temporary information in users’ browsers. You can use this information to enhance the user experience through personalization and behavioral targeting. In this ultimate guide, we will show you how to set, get, and delete WordPresscookies like a professional. Note: This is an advanced tutorial. It requires you to be proficient in HTML, CSS, WordPress websites and PHP. What are cookies? Cookies are created and stored when users visit websites.

Do you see the "429 too many requests" error on your WordPress website? This error message means that the user is sending too many HTTP requests to the server of your website. This error can be very frustrating because it is difficult to find out what causes the error. In this article, we will show you how to easily fix the "WordPress429TooManyRequests" error. What causes too many requests for WordPress429? The most common cause of the "429TooManyRequests" error is that the user, bot, or script attempts to go to the website

WordPresscanhandlelargewebsiteswithcarefulplanningandoptimization.1)Usecachingtoreduceserverload.2)Optimizeyourdatabaseregularly.3)ImplementaCDNtodistributecontent.4)Vetpluginsandthemestoavoidconflicts.5)ConsidermanagedWordPresshostingforenhancedperf


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version
Chinese version, very easy to use

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
