Owning a website becoming expensive?

No more! In our library, you will find the best premium WordPress plugins and themes for a fraction of the cost of the original prices. Browse Our Library

How To Remove Post Date In WordPress – The Definite Guide

How To Remove Post Date In WordPress – The Definite Guide

Every WordPress blog post is displaying the date that it was published on.

Often, the date meta tag is irrelevant to the post itself and it can be removed.

In this article, we will teach you how to remove post date in WordPress in multiple ways.

How To Remove Post Date In WordPress

The post date is notifying the reader when the post was published.

Post date in WordPress blog post

We can hide the date in four different ways:

You can choose one of the ways above, based on your experience and preferences.

The settings screen

When using this method, we will change the default WordPress date format to display an empty date.

This is not an ideal way because it will not remove the author and date meta tags. It will keep the post information but just won’t print it to the screen.

As a result, your post footer may still show the word Published but without the date.

To change the date format, navigate to Settings -> General, change the date format to custom, and delete the content.

Remove post date from the settings screen

When done, save the changes, and revisit your post.

As said above, the published word is still appearing and wasn’t deleted.

Post date was removed after changing the date format

The better way to do it is to use CSS, follow the method below to find out how.

Using CSS

To remove the date tag with CSS, we will first need to get the date class and then apply the right styling rule to it.

Because every theme has a different class for the date, we will need to inspect the element and find the right class.

First, visit any of your blog posts, right-click on the date, and click Inspect.

Inspect post date

Then, look for the dates’ class name and copy it to the clipboard.

In the image above we can see that the .entry-date class is only targeting the date but the .posted-on class is targeting the date and the word Publish so, therefore, that is the one we need.

find post date element class

After getting the right class, click on the Customize link from the admin menu bar and get into the Additional CSS tab.

Additional CSS

Here you will need to paste the class name together with .single-post to hide it only for blog posts.

.single-post .class-code-here {
display: none!important;
}

Make sure to replace the class-code-here with the actual class of the post date and click publish.

You can see that the CSS rule is affecting the page immediately and the date was hidden successfully.

Hide Post date with CSS

To save you valuable time, below are the codes to hide the post dates of the most popular themes. Just copy the relevant code and paste it into the customization screen of your theme.

Hide post’s date of popular themes

OceanWP
.single-post .meta-date {
display: none;
}
GeneratePress
.single-post .entry-meta {
display: none;
}
Astra
.single-post .posted-on {
display: none;
}

Now let me show you how to hide the post dates by using a plugin.

Using a plugin

This is an easy method and it will work with all themes.

By default, the plugin that we will use in this method will hide the author and the date meta tags for all the pages of the website.

If that is ok with you, great, all you need to do is to activate the plugin. If you would only like to hide the author and date of the posts we will need to adjust it a bit and I will show you how.

From your WordPress website, navigate to Plugins -> Add New and install the WP Meta and Date Remover plugin.

WP Meta and Date Remover Plugin

After activating the plugin, visit any page or a blog post of your website and verify that the author and date tags were removed successfully.

If you would like to hide it only for blog posts, we will need to modify the plugin.

Navigate to Settings -> WP Meta and Date Remover and replace the CSS in the box with the following:

.single-post .entry-footer {display:none !important;}

All we did was adding .single-post to the beginning of the third row and deleted the rest.

Date remover plugin configuration

Make sure to save the changes and visit the posts to make sure the author and date tags are hidden.

Edit the theme template

While the two methods above are beginners’-friendly, this method is only recommended for intermediate users that feel comfortable to edit core files.

Every WordPress page or post is generated by a theme PHP template.

The template is determent what should be print and display on the page.

If we can find the code that calling the title, we will be able to delete it and then the document will not show the date again.

It is recommended to backup your website before editing core files and only work with a child-theme.

First, navigate to Appearance -> Theme Editor.

Edit post template

On the right sidebar, you can see all the files that generating your website. Usually, the posts template is called single.php. Find and click on it.

On line 18 of the Twenty Twenty-One theme, we can see that the functions that generate the post are called content-single and are inside the template-parts/content folder.

Blog post template part

Therefore, let’s navigate into it and hide the date from there.

After opening the relevant file, I can comment-out or delete the post footer div and save the changes.

Delete blog post footer

Now revisit your posts and make sure the date and author were deleted successfully.

Conclusion

In this article, you learned how to hide the WordPress post title in various ways.

Leave us a comment on which method you used or if you need a custom CSS for the theme you’re using.

Also, make sure to subscribe to our YouTube channel and like our page on Facebook.

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email

PluginsForWP

PluginsForWP is a website specializing in redistributing WordPress plugins and themes with a variety of knowledge about WordPress, internet marketing, and blogging.

Leave a Reply