Do you worry that old timestamps on comments make your content look outdated?
Even if you recently updated a post, a comment from five years ago might convince a visitor that the information is no longer relevant. This often stops new readers from joining the conversation.
At WPBeginner, we display comment dates to provide context for our tutorials. However, removing them is a popular strategy for sites that want to maintain a strictly evergreen appearance.
In this article, we will show you how to easily remove the date and time from WordPress comments.

🚨 Important Note: This article is only for removing date and time in WordPress comments. We do not recommend doing the same for your WordPress posts. For details, see our tutorial on why you should not remove dates from WordPress posts.
Why Remove the Date and Time From WordPress Comments?
When readers see older comments with dates from months or years ago, they might assume the article is outdated, even if the information is still relevant.
Some users believe that hiding the date and time for their comments will prevent their articles from looking dated, improving their search engine rankings.
By hiding the date, the focus stays on the content and the discussion rather than the age of the comments, which helps you maintain a fresh and active appearance.
Removing dates and times can also help your site if it has low comment activity. If visitors notice that the most recent comment was published a long time ago, they might hesitate to engage, assuming that your site is not active.
By removing these timestamps, you eliminate any potential hesitation and create a more welcoming environment for discussion.
However, keep in mind that removing dates from comments can also have some potential drawbacks, as it can create confusion for users.
Some readers prefer to know when a comment was made to better understand the context of the discussion, especially for content that changes over time, such as tutorials, reviews, or guides.
Without timestamps, readers may have difficulty understanding whether a comment is still relevant to their situation.
That said, let’s look at how to easily remove the date and time from WordPress comments.
How to Remove the Date and Time From WordPress Comments
You can easily remove the date and time from WordPress comments by adding custom code to your theme’s functions.php file.
However, keep in mind that even a small error in the code can break your website.
That is why we recommend using WPCode. It is the best WordPress code snippets plugin on the market and the safest way to add custom code to your site.
During our evaluation, we found it to be the easiest and safest way to add custom code. To learn more, see our WPCode review.
First, you need to install and activate the WPCode plugin. For detailed instructions, you may want to see our beginner’s guide on how to install a WordPress plugin.
Note: WPCode also has a free version that you can use for this tutorial. However, upgrading to the paid plan will give you access to the cloud library of code snippets, conditional logic, and more.
Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress admin sidebar.
From here, hover your mouse over the ‘Add Your Custom Code (New Snippet)’ option and click the ‘Use Snippet’ button.

On the next screen, you can type a name for your code snippet. This can be anything that helps you identify the code, like ‘Remove Comment Date’.
Next, choose the ‘PHP Snippet’ option from the code type dropdown menu in the right corner of the screen.

After that, simply copy and paste the following code into the ‘Code Preview’ box:
// Remove comment date
function wpb_remove_comment_date($date, $d, $comment) {
if ( !is_admin() ) {
return;
} else {
return $date;
}
}
add_filter( 'get_comment_date', 'wpb_remove_comment_date', 10, 3);
// Remove comment time
function wpb_remove_comment_time($date, $d, $comment) {
if ( !is_admin() ) {
return;
} else {
return $date;
}
}
add_filter( 'get_comment_time', 'wpb_remove_comment_time', 10, 3);
After that, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode.
This will automatically execute the code on your site.

Next, scroll back to the top of the page and toggle the switch to ‘Active’.
Finally, click the ‘Save Snippet’ button to store your settings.

Now, you can visit your website to see the date and time removed from your WordPress comments.
Please note that this method does not remove comment dates and times from your WordPress database.
Removing the code will immediately start displaying the date and time for WordPress comments on your site.

Bonus: Remove Author Name From WordPress Posts
You can remove the date and time from comments and the author’s name from posts on your WordPress blog.
Displaying the author’s name helps build trust and transparency with your readers. However, removing the date and time can prevent your comments from looking outdated.
However, if you run a multi-author blog or manage guest bloggers, then removing the author’s name can make your site look more consistent.
You can easily do this by adding a CSS code snippet to your website with WPCode.

For more details, see our tutorial on how to remove author names from WordPress posts.
Frequently Asked Questions About WordPress Comment Dates
Here are some of the most common questions our readers ask about removing date and time stamps from the comment section.
1. Does this code delete the dates from my WordPress database?
No, this code snippet does not delete any data from your WordPress database. It simply stops your WordPress theme from displaying the date and time on the front end of your website. If you remove the code snippet, the original dates and times will immediately reappear.
2. Can I use CSS to hide the comment date and time?
Yes, you can use CSS (specifically display: none;) to visually hide the date elements. However, we recommend the PHP method used in this guide because it prevents the date data from being processed and displayed by your theme.
3. Will removing comment dates hurt my SEO?
Removing comment dates generally does not hurt SEO. In fact, for evergreen content, it can improve user engagement by making the discussion feel active and relevant regardless of when the comments were posted. However, Google may still see the date in your site’s metadata.
4. Can I change the date format instead of removing it?
Yes. If you only want to remove the specific time or change how the date looks (for example, showing ‘July 2024’ instead of the full date), you can do this in your WordPress dashboard settings. For details, see our guide on how to change date and time format in WordPress.
Additional Resources
We hope this article helped you learn how to easily remove date and time from WordPress comments. You may also want to see some additional resources:
- How to Add a Dynamic Copyright Date in WordPress Footer
- Best WordPress Database Plugins – Expert Pick
- How to Change Date and Time Format in WordPress
- Beginner’s Guide on How to Moderate Comments in WordPress
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.


Jiří Vaněk
I like snippets for their simplicity and because I don’t necessarily have to use a plugin for everything. I even made a folder in the browser from your article with snippets. I also saved this one, because this function can come in handy at any time. Thank you for sharing these snippets so we can avoid another unnecessary plugin.
Pandu Aji
Finally, i can get rid all dates from my evergreen content
WPBeginner Support
Glad we could help show how to remove the dates
Admin
Dennis Muthomi
I have a question relating to comments…is there a way to pin a reader’s comment in WordPress, similar to how YouTube allows pinned comments??
WPBeginner Comments
For a pinning comments feature, you may want to use the plugin in this guide: https://014.leahstevensyj.workers.dev/beginners-guide/beginners-guide-on-how-to-moderate-comments-in-wordpress/
Roger M. Jenson
I agree that removing the date may not be the best idea. The blog entries at some sites show “Updated over a week ago” in the date area. I think that Updated over a ago where the time period could be week, month, six moths, etc. could be interesting. All I need is to learn how to do it.
WPBeginner Support
For a starting point you may want to take a look at our article below:
https://014.leahstevensyj.workers.dev/wp-tutorials/display-the-last-updated-date-of-your-posts-in-wordpress/
Admin
Chinmay Rajyaguru
How to remove/change ‘at’ only?
WPBeginner Support
For specific edits like that, you would want to reach out to the support for your specific theme.
Admin
Ivan
Awesome! Thanks for sharing. My first attempt to play with theme coding and it worked
Your advice is much appreciated!
WPBeginner Support
You’re welcome, glad our guide could help
Admin
Ahmad Wali
Can you please recommend any good plugin to completely hide comments, date section from wordpress websites?
WPBeginner Support
If you want to completely remove the comments, you would want to take a look at the article here: https://014.leahstevensyj.workers.dev/wp-tutorials/how-to-completely-disable-comments-in-wordpress/
Admin
Marv
Works like a charm! Thank you
WPBeginner Support
Glad our article was helpful
Admin
Luke Thomas
Thanks again, it worked like a charm on the website. It goes to show even for people who are not that familiar with coding can accomplish these tasks with the help of WPBEGINNER.
WPBeginner Support
You’re welcome, glad our guide could help
Admin
Sahil Sharma
Thanks for the solution.
How to remove blank space create after remove date and time ??
Thanks
WPBeginner Support
That would require editing your theme’s CSS which is different for each theme. If you reach out to your theme’s support they should be able to assist.
Admin
Pete
Hi,
I tried to use the php code above and it worked
But, how to use php code to remove ‘at’?
I used the css code above, but that would be a hidden text. When I viewed the source code, ‘at’ was still there.
How to use php code to remove ‘at’?
Thanks
WPBeginner Support
For that, you would normally want to reach out to your theme’s support and create a child theme to edit the comment template rather than use PHP.
Admin
Saarika
Date and time got removed but i can see the link on at. I am applying the css u mentioned but its not working
WPBeginner Support
Your specific theme likely may have different stylings for your comments, if you reach out to your theme’s support they should be able to let you know.
Angel Costa
I truly hate every website that removes dates so its content seems to be everlasting. It’s misleading and we can’t tell if something is outdated or not.
Sofor
Sorry, I can’t agree with you.