Remove Post Meta WordPress

Remove or Hide Post Meta from WordPress Posts

Ever notice that when you look at an article on WordPress — maybe even on your own website — it is very busy? In this post, Remove or Hide Post Meta from WordPress Posts we explain the process.

Sometimes, people just want to read content and having a bunch of random information about the article (what type of coffee the person was drinking when they wrote it, what time it was in China when the article was written, etc.) can be either distracting to a viewer or downright unnecessary.

That extra information is called Post Meta in WordPress, and the following information will inform you as to what post meta specifically is and how you can hide it using CSS, PHP, or — even more easily — our themes.

Remove post meta using CSS
Remove post meta using PHP
Remove post meta on our WordPress themes

What is Post Meta in WordPress?

Post Meta is the information in WordPress that displays on a post and tells the reader archive information about the article or post.

On a base level, the user is clued in to what time the post was originally published as well as other information, like the category of the post.

 

Displaying the information is good practice for magazines and other news articles because it timestamps information and chronicles the post. Let’s say I really liked an article on CNN’s website (which runs on WordPress). I can see when it was written, and if the article is about technology, for example, I can click on that post meta and get taken to a category archive of recently published technology posts.

This increases readability!

Remove or Hide Post Meta from WordPress Posts

 

Why Hide or Remove Post Meta?

The problem with Post Meta is that it isn’t for everyone. This is why I’m writing the article. Remove or Hide Post Meta from WordPress Posts.

While it works on a magazine or news level, the problem is that not everyone is writing articles like that.

When you are writing Evergreen content, or content that never changes, maybe you don’t want the reader to know when the article was originally published. The article, while still relevant today may have been written five years ago and may be seen as irrelevant, even when it isn’t.

Also, too much information on the page, as mentioned above, can become very distracting to a reader.

Hide Post Meta  will differ on some Themes

But, give it a try. On your theme visit the WordPress Theme Options section under Appearance > Theme Options and then navigate to the General tab.

Once you have navigated to the proper place, you can go to the section with the sliders and simply click the slider to hide or show the post meta.

Make sure you save the changes before viewing the page to make sure it is being hidden.

Remove or Hide Post Meta from WordPress Posts

It’s that simple!


Hide Post Meta using Astra Themes

Thankfully, if you are not keen with coding and want a stress-free fix, Astra themes which I use and highly recommend have been developed with an on-off switch for post meta data.

 

Remove or Hide Post Meta from WordPress Posts

Note: Page setting as shown above will overide settings in the Customizer. When you choose a setting here on the page meta setting it will overide settings on each page or post. As an example, suppose you enable a primary header on your entire website in the Customizer settings. But you wish to edit the “Contact Page” and disable the primary header only on the Contact page this is where you can do that. And you can do this with all pages.

Another post that may be of interst to you How to Hide the Tagline in WordPress.

Or use a plugin to remove author meta and date from posts and pages.

WordPress Widget for data removal

 

Edit Post Meta of a Specific Post on WordPress

One way to delete post meta for good is to edit the PHP on specific posts.

Let us say that you had one specific post and you did not want people to access the date or category information on the post.

Using this string, you can delete certain elements of post meta:

<?php delete_post_meta($post_id, $meta_key, $meta_value); ?> 

You would place the id of the individual post, the value of the meta key, which is the element of the post you want to delete, and the value, which is the individual data you want to delete in that element.

Here is a resource for more WordPress information on how to tweak post meta in PHP. Make sure you have a child theme activated before tweaking!!

Hide Post Meta using CSS

You can elements of post meta entirely using CSS coding, which is a bit more of a coder-friendly method.

Once you have created your child theme (which we also make VERY easy with one-click child themes), you can go to the WordPress code editor and tweak the section.post-meta area of our themes to tell it not to display with the:

display: none;

Thanks for reading this post!

 


We hope that you enjoy our content. If you decide to make a purchase after clicking on one of our affiliate links, we’ll earn a small commission at no extra cost to you. Thanks for reading! View our Affiliate Disclosure

Leave a Comment

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