How to Remove Dates from WordPress Posts (Quick Ways)

Are you looking to remove dates from your WordPress posts, but you’re not sure how to do it? Whenever we write and publish a post on our website, a timestamp is created for the post. This shows Google and other search engines when the post was created and what date it was last updated.

As one of Google’s ranking factors, it uses the date and the modified date to determine the freshness of the content, and it also helps them categorize the articles from the newest to the oldest order. And we often want to remove dates from our articles.

But why do we want to remove the dates from the posts, when it’s a ranking factor?

Usually, we want to remove the date from our posts, because we don’t have much time to update them frequently, and the user can easily determine if the post is new or if it was published a month or a year ago, which is sometimes a bad thing.

Post Published Dates are Showing in “Schema Validator

Aside from this, there are many other search engines that use dates to determine the freshness of the article and use that as a ranking factor. Unless we remove dates from the posts, search engines can easily determine whether or not the posts have been published or updated recently.

This is why it’s essential for you to remove the dates from your WordPress posts, although I wouldn’t recommend doing so on blog posts.

How to Remove Dates from WordPress Posts

There are various methods to remove the dates from your WordPress posts. In some methods, you can completely remove the date from your website and from metadata. In other cases, you can only hide the dates from users.

We’ll cover both methods in this guide, and depending upon your needs you can effectively choose the right one for your needs.

  • Removing Date by Editing Theme’s Code
  • Removing Date Using WordPress Plugin
  • Removing Dates from the WordPress Dashboard
  • Hiding Date Using Custom CSS

When using the first two methods, the date will be removed completely from search engines as well as users. However, when using the last two methods, the date will only be hidden from users but will remain visible to search engines.

So let’s get started…

Removing Date by Editing Theme’s Code

Basically, the first method we are going to discuss here is editing the code of your theme. There is a bit of technical knowledge required, but we decided to share this method first since not everyone would want to use an extra plugin just to remove the date from their website’s posts and pages.

Therefore, removing the date from the code of your theme is an effective method for you to use. In this method, the date can be completely removed from your posts, but depending on which SEO plugin you are using on your website, the date may still be visible on your site (we will also cover how to remove the date and time from the RankMath plugin).

Open “Theme Editor” from Appearance > Theme File Editor

The first thing you have to do is open up your theme editor for this method. You can easily do so by clicking on “Appearance > Theme File Editor” on the menu bar.

GeneratePress Date & Time Function (inc/structure/post-meta.php)

Upon opening the “Theme File Editor“, you will need to search for the code which contains the date and time functions. In my case, I’m using the GeneratePress theme, and the code for this can be found in the “inc/structure/post-meta.php” file, with the $posted_on field.

Change Code on Your Theme

According to the theme that you use, you can edit the value of this variable or delete the variable as well. In my example, I do not know how many times and where this variable has been used. Therefore, I will simply change the value of the variable to a blank value.

Then, once the variable has been modified, I will click on the “Update File” button to save the changes.

💡 Tips to Remember;

Whenever you are modifying the core files of a theme, it is always good practice to take a complete backup of the site and theme before making any changes. This will reduce the chance of losing your website and its content, and you will be able to recover data if the worst happens.

You should also make sure the theme’s update option is disabled or set to manual update before you make any changes. The reason is because if your theme updated automatically, all your modifications would be lost.

The date is Successfully Removed from Schema

Now that you have removed the date from your website, you can check the “Schema Validator” again on the same URL and see that it has been removed from the “CreativeWork” schema.

The date is Still Showing in RankMath’s Schema

In the case that you are using any SEO plugin on your website, the schemas which are created by your SEO plugin will still contain the date and time. For my case, I’m using RankMath, so I’m still getting the date and time on the “BlogPosting” schema.

If you would like to remove the date and time for the user only, then you can leave this as it is. But if you want to remove the date for the search engines as well, then you need to follow the steps we’re sharing below.

Removing Date & Time from RankMath

In order to remove the date and time from RankMath, we first need to install a plugin called “Code Snippets“. This method can also be used without using this plugin, but it is highly recommended to use this plugin.

Installing the “Code Snippets” Plugin from WordPress Repository

In order to install this plugin, you need to open your website’s admin panel and navigate to “Plugins > Add New Plugin” and then search for the “Code Snippets” plugin.

PHP Code to Remove Date from RankMath

After you have installed and activated the plugin, you will need to go to “Snippets > Add New” and paste the code we are sharing below. The code can also be found on the official website here.

After pasting the code, scroll down to the bottom of the screen and click on the “Save Changes and Activate” button.

The Date is Now Removed from RankMath’s Schema

Now, if you check your website’s URL on RankMath’s schema, you will see that the date is completely removed from the URL.

Removing Date Using WordPress Plugin

The code of every website is different, and not everyone is comfortable editing the code of their website. If you’re not using GeneratePress, what you need to do is manually locate the code that is used by your theme for showing the date, and change it.

You should be aware that every theme is not created in the same way, and when you try to do so, you will cause a 500 error on your website, which is no one’s favorite.

Search for “WP Meta & Date Remover” Plugin

It’s very easy to do with this method. The first thing you need to do is search in your WordPress repository for a plugin named “WP Meta and Date Remover“. There are various plugins with similar names, but you must install the plugin created by Prasad Kirpekar.

As soon as you find the plugin, you need to click on “Install Now” and then “Activate“.

Skip the Connection Request

Once the plugin is installed and activated, it will redirect you to a page in the “Settings > WP Meta and Date Remover” section, where you might be asked to grant permission. In case you wish to grant permission, you must click on the “Allow & Continue” button; if you do not wish, you can “Skip” this option.

In my case, I am going to skip this option.

Options in “WP Meta and Date Remover”

You will now be redirected to the options page, where you will be shown different ways of removing the date and other metadata from your website.

Here are three different options that you can choose from:

  • Remove from Homepage: If you enable this option, then it will remove all metadata from your homepage and archive pages.
  • CSS-based Removal: If you wish to remove only dates and other metadata from users, you can enable this option (dates will still be visible to search engines).
  • PHP Removal: With this option, the date function in your theme will be completely disabled. As I tested this with GeneratePress, it successfully removed the date from the whole website – but if you’re using some SEO plugin, then the date will be visible in their schema. However, you can follow the method we provided in the above guide to remove dates from the RankMath SEO plugin.

You need to select the right option according to your needs here. If you would like to remove the date and all other metadata completely, then check all the options and click “Save Changes“.

There is only one disadvantage of using this option, it will also remove other metadata, like the author, entry footer information, etc.

Removing Dates from the WordPress Dashboard

The two methods mentioned above can be used to get rid of the date from both the user’s and SERP’s perspectives – but what if you just want to remove the date from the user’s perspective and not from the search engines?

What should you do in this case?

If you are in this case, all you have to do is to change the date and time format within your blog’s general settings.

Here are the steps on how to do it;

Set Date & Time to “Custom” and Set Blank Value

First of all, you need to go to ‘Settings > General‘ and scroll down to the date and time settings. Once you’ve reached the date and time settings, you will need to change both date and time to “Custom” and then delete the field that shows up next to it.

The date will now be completely invisible to users. However, the search engines will still be able to get the date that the last modified and published data of your website’s post.

Hiding Date Using Custom CSS

This is the last method we will cover in our guide about hiding the date with CSS. By using this method, it is quite simple for you to hide the metadata and date from users, but not for search engines.

In this method, you can easily hide metadata using the CSS code shared below (The code is copied from the plugin shared in step 2 of our guide).

 .entry-meta { display: none !important; }
 .home .entry-meta { display: none; }
 .entry-footer { display: none !important; }
 .home .entry-footer { display: none; }

This code needs to be pasted into the “Appearance > Customize > Additional CSS” box. Below are instructions on how to do it;

Open Customizer from “Appearance > Customize”

In order to start, you will need to open the “Customizer” page from the “Appearance > Customize” menu. We are opening this page so that we can add the code that has been shared above to our website.

Open “Additional CSS”

As soon as you have entered the customizer option, you will need to open “Additional CSS,” as shown in the image above.

Once the CSS code is pasted, the metadata will be removed!

The next step is to paste the code we shared in our guide.

When the code is pasted into the website, you will immediately see that the metadata has been hidden from public view. At this point, you can click on the “Publish” button to save the changes.

Frequently Asked Questions (FAQs)

Still, have doubts? We are sharing some FAQs with you that can help you in making an informed decision.

Q. How do I get rid of the date on WordPress?

There are many ways in which you can get rid of the date on your WordPress website. If you want to hide dates, you can choose between using a WordPress plugin, editing your theme code, and even using custom CSS codes for it.

Throughout our guide, we have discussed all of these methods so you can effectively pick the method that suits your particular needs.

Q. Does hiding dates from search engines affect our SEO?

For some search engines, there are other conditions that influence their ranking, and the ModifiedDate is also one of the factors that Google uses to determine whether an article is fresh.

Therefore, we usually do not recommend removing the date from your blog posts – because it can negatively affect your ranking as well.

Q. How do I remove author details from WordPress?

The most effective way to remove the author information from WordPress is by using the “WP Meta and Date Remover” plugin. Using this plugin, you can easily remove the date, the footer entry meta, and the author from both posts and pages.

Alternatively, you are also able to use the CSS method to hide these details from your website.

Wrapping Up!

The following are the best methods you can use to remove the dates from your WordPress posts and pages. Depending on your needs and requirements, if you’re trying to remove the dates, you can choose to use any of these methods.

Nevertheless, it is not recommended to do so for a blog with regular and frequent post updates.

In case you liked this guide, or on the other hand, if you have any additional queries relating to this guide, please feel free to leave a comment using this form. We will do our best to respond to every question sent.

Happy Blogging 🙂

Sunny Kumar

Number of posts: 145

Hi, I'm Sunny Kumar, a passionate tech enthusiast and a blogger from New Delhi, India. With a degree in IT from IIT-D and expertise in SEO, Cloud Computing, Telecom & Networking, and CEH, I specialize in various technical fields, including SEO, WordPress Development, and PC Building. And being a proficient WordPress user, I’m dedicated to delivering quality content and a remarkable user experience.

Leave a Comment