Search

How to Remove Date on WordPress Comments (without Plugin)

Do you want your WordPress comments to feel timeless? Eliminate the dates!

You have the power to make your blog posts and discussions eternally youthful, even though time passes. Wondering how to give your WordPress comments a timeless feel and boost engagement? The key is to take out the dates. Easy peasy.

Say goodbye to the ever-present timestamps that affect conversations and potentially discourage new readers. In this article, we will show you how to remove the date and time from the WordPress comments.

WordPress comment without posting date

Steps to Remove Date from a WordPress Comment

Step 1: Find Out the Class Name of the Comment Date Element

First, you must find the class name of your comment date element. The class name depends on the WordPress theme you use. So, how to get the class name of the comment dates?

Go to any one of your blog posts that already has a comment.

You can use the built-in Developer Tools of your web browser (nearly all web browsers have this feature). If you use Google Chrome, you can click the menu icon (three-dot icon) and select More Tools -> Developer Tools.

Access Developer Tools feature on Google Chrome.

Once you’ve entered the Developers Tools window, click the arrow icon to inspect an element on your page (see the image below).

Next, point the cursor to the comment’s date element to determine the HTML class name.

Finding the CSS class name of the comment date

As in the image above, the class name appears when you hover over the comment’s date element. For this example, our class name is “.comment_date“.

Step 2: Adding the Simple CSS Snippet

Once you’ve recognized the class name of the comment dates element, we will use it to add a simple CSS snippet to the WordPress Additional CSS.

On your WordPress dashboard, go to Appearance -> Customizer -> Additional CSS. Afterward, copy the CSS snippet below and paste it into the available field.

Note: If you’re using a block theme, click here to learn how to enable a theme customizer on your WordPress.

.comment_date {
	display: none !important;
}

Here’s a breakdown of the CSS code:

  • Selector:
    • .comment_date targets every comment dates and times element that has the class “comment_date”.
  • Property and Value:
    • display: none sets the display property of these elements to “none”. This means the comment dates elements will be completely hidden from view on the page.
  • Importance:
    • !important gives this rule a higher priority than other styles that might be affecting the same elements. So, even if other styles try to show the comment dates, this rule will override them and ensure they remain hidden.

As you can see from the image above, the comment’s date element is completely removed. Don’t forget to click the Publish button to apply the changes you’ve made.

The Bottom Line

This article shows how easily you can remove the date and time on the WordPress comment by adding a simple CSS snippet to your WordPress theme. There are two other ways to remove the date and time from WordPress comments, such as using a plugin or employing a custom function.

Nevertheless, we highly recommend using the “CSS method” due to this method is simple, and direct and avoids potential performance impacts.

This page may contain affiliate links, which help support our project. Read our affiliate disclosure.
Picture of Akbar Padma

Akbar Padma

Akbar is a WordPress expert and a writer staff at WPPagebuilders. He mainly writes about Gutenberg, Elementor, Divi, and other WordPress page builders.
Want to save yearly expense up to $219? why not?

Leave a Comment