Do you want to remove dates from the WordPress comments area on your website? Recently bloggers have been wanting to remove comment dates to make their comments look fresh and evergreen. In this article, we will show you how to remove dates from WordPress comments.
Should you Remove Date from WordPress Comments?
Some users believe that hidingΒ date and time in WordPressΒ will prevent their articles from looking dated thus improving theirΒ improve WordPress SEOΒ and search engine rankings.
We disagree with this sentiment. In fact, we believe removing dates can be quite problematic.
You can see our article on why youΒ should not remove dates from WordPress postsΒ for more details.
Same arguments are true for your WordPress comments as well. Removing date and time from comments will hide important information which would make older comments look odd.
However, we understand that some users may be using comments differently than normal web comments. For example, on aΒ WordPress intranetΒ or a web application.
In that case, they may need to remove date or time from WordPress comments to meet their requirements.
That being said, letβs take a look at how to easily remove date and time from WordPress comments.
Removing Date and Time from WordPress Comments
This tutorial requires you to edit your WordPress theme files. If you havenβt done this before, then please take a look at our guide on how toΒ copy and paste code in WordPress.
First you need to add the following code in your themeβsΒ functions.phpΒ file or in aΒ site-specific plugin.
You can now visit any post with comments on your website, and you will see the date and time are no longer visible.
However, you may also find preposition words likeΒ βatβΒ orΒ βposted onβΒ left behind.
To remove them, you need to point the cursor to those words and right-click to select βInspectβ from the browser menu.
Next, you need to note the CSS class used in the surroundingΒ divΒ orΒ spanΒ around date/time in your theme.
After that you need to add the followingΒ custom CSSΒ to your theme to hide this information:
display:none;
}
You can now save your changes and visit your website to see it in action.
Thatβs all you have successfully removed date and time from WordPress comments.
Please note that this method does not remove comment dates and time from yourΒ WordPress database. Removing the code will immediately start displaying date and time for WordPress comments on your site.
We hope this article helped you learn how to easily remove date and time from WordPress comments. You may also want to see our list of theΒ must have WordPress pluginsΒ for business websites.
If you liked this article, then please subscribe to ourΒ YouTube ChannelΒ for WordPress video tutorials. You can also find us onΒ TwitterΒ andΒ Facebook.