The Must Have for WordPress
The Must Have for WordPress
×
  • Home
December 5, 2019
WordPress

Remove date / time from WordPress comments

by Martin Jost
No comments
1 min Reading Time
848 Views
5 Score
3 Likes
Share on Facebook Tweet on Twitter Share on Linkedin Pin on Pinterest Send via E-Mail Send via WhatsApp

By default, the date and time of a comment are displayed in WordPress. Basically, it is always a theme decision how comments are displayed. Sometimes less is more and the commenting time should be removed in the design point of view.

How can I hide the date?

We use the WordPress filter get_comment_date to hide the date from the comments. To do this, including the following code snippet, for example into the functions.php file of your theme:

How can I remove the time from comments?

To additionally remove the time from the comments, we use the WordPress filter get_comment_time. The following code snippet is helpful for us:

A little more CSS and ready!

To completely remove everything from the WordPress comments metadata, it’s necessary to write a bit more CSS. Because a small part of the text output is still visible after including this two WordPress filters. Just add the following CSS snippet to the style.css file of your child theme.

That’s it! This will hide the date and time of each WordPress comment in the future.

Last updated: December 5, 2019

Remove date / time from WordPress comments Score: 5 / 5 (2votes)
Share on Facebook Tweet on Twitter Share on Linkedin Pin on Pinterest Send via E-Mail Send via WhatsApp
The Author
Published by
Martin Jost

View all posts by Martin Jost

Related Posts
G
PHP Get the absolute File Path (Document Root-Path) in WordPress

Wenn man als Webentwickler mit Dateien arbeitet, die auf dem Server liegen und diese innerhalb e ...

Read More
T
PHP Trim a PHP string before the last special character

This small PHP function is helping us to get only a part of a value (string) by using a specific ...

Read More
C
PHP Customize the default WordPress Image Compression

WordPress uses its own compression for images that are uploaded directly into WordPress. This ha ...

Read More
Read more
A
Previous Post
Anonymize IP address of WordPress comments
S
Next Post
Set custom WordPress post format for custom post type
Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Imprint
  • Privacy Policy
© 2016-2023 - wphave - The Must Have for WordPress
Login

Lost your password?

RequiredEssential cookies enable basic functions and are necessary for the proper functioning of the website.
  • Name: Cookie Status
  • Provider: Owner of this website
  • Purpose: Is necessary to check whether the user's web browser allows cookies.
  • Privacy Policy: https://wphave.com/privacy-policy/
  • Cookie Name(s): cookie_status
  • Duration: 1 Minute
  • Name: Cookie Consent
  • Provider: Owner of this website
  • Purpose: Is necessary to check whether the user agrees to allow opt-in cookies or not.
  • Privacy Policy: https://wphave.com/privacy-policy/
  • Cookie Name(s): cookieconsent_analytics, cookieconsent_marketing, cookieconsent_status
  • Duration: 1 Year
  • Name: Like Button
  • Provider: Owner of this website
  • Purpose: Is necessary to check whether the user has already gave a like for a specific post.
  • Privacy Policy: https://wphave.com/privacy-policy/
  • Cookie Name(s): like_btn_{POST_ID}
  • Duration: 21 Days
  • Name: Post Rating
  • Provider: Owner of this website
  • Purpose: Is necessary to check whether the user has already rate a specific post.
  • Privacy Policy: https://wphave.com/privacy-policy/
  • Cookie Name(s): rating_{POST_ID}
  • Duration: 7 Days
AnalyticsStatistics cookies collect information anonymously. This information helps us to understand how our visitors use our website.
  • Name: Google Analytics
  • Provider: Google LLC
  • Purpose: Google cookie for website analysis. Generates statistical data on how the visitor uses the website.
  • Privacy Policy: https://policies.google.com/privacy
  • Cookie Name(s): _ga, _gat, _gid
  • Duration: 2 Years