• Login
  • Register
Monday, August 15, 2022
en
afsqam ar hy az eu be bn bs bg ca ceb ny zh-CN zh-TWco hr cs da nl en eo et tl fi fr fy gl ka de el gu ht ha haw iw hi hmn hu is ig id ga it ja jw kn kk km ko ku ky lo la lv lt lb mk mg ms ml mt mi mr mn my ne no ps fa pl pt pa ro ru sm gd sr st sn sd si sk sl so es su sw sv tg ta te th tr uk ur uz vi cy xh yi yo zu
Victor Mochere
No Result
View All Result
  • Wealth
  • Business
  • Education
  • Travel
  • Technology
  • Living
  • Entertainment
  • Governance
  • Sports
  • Life Hacks
en
afsqam ar hy az eu be bn bs bg ca ceb ny zh-CN zh-TWco hr cs da nl en eo et tl fi fr fy gl ka de el gu ht ha haw iw hi hmn hu is ig id ga it ja jw kn kk km ko ku ky lo la lv lt lb mk mg ms ml mt mi mr mn my ne no ps fa pl pt pa ro ru sm gd sr st sn sd si sk sl so es su sw sv tg ta te th tr uk ur uz vi cy xh yi yo zu
Victor Mochere
No Result
View All Result
en
afsqam ar hy az eu be bn bs bg ca ceb ny zh-CN zh-TWco hr cs da nl en eo et tl fi fr fy gl ka de el gu ht ha haw iw hi hmn hu is ig id ga it ja jw kn kk km ko ku ky lo la lv lt lb mk mg ms ml mt mi mr mn my ne no ps fa pl pt pa ro ru sm gd sr st sn sd si sk sl so es su sw sv tg ta te th tr uk ur uz vi cy xh yi yo zu
Victor Mochere
No Result
View All Result
Home Life Hacks

How to remove dates from WordPress posts

Victor Mochere by Victor Mochere
in Life Hacks
Reading Time: 3 mins read
A A
0
How to remove dates from WordPress posts

If you maintain a website whose contents are not time oriented, for instance in a non-blog context, you may want to give the dates. Publication dates might give the impression that your content is old and outdated. There many ways you can use to remove the publication or modified dates from your WordPress website. Here we are going to highlight the simplest and quickest ways to achieve that without having code knowledge or straining that much.

In the article

  • 1. Function method
  • 2. CSS method
  • 3. Theme code method
  • 4. Plugin method

1. Function method

Copy the code below and paste it in the functions.php file.

  1. Go the the ‘Admin Panel’
  2. Then to ‘Appearance’
  3. Click on ‘Editor’
  4. Then locate the ‘functions.php’ file
				
					function jl_remove_post_dates() {

                add_filter('the_date', '__return_false');

                add_filter('the_time', '__return_false');

                add_filter('the_modified_date', '__return_false');

} add_action('loop_start', 'jl_remove_post_dates');
				
			

If the above code doesn’t work, try replacing it with the one one below which is more ‘aggressive’.

				
					function jl_remove_post_dates() {

                add_filter('the_date', '__return_false');

                add_filter('the_time', '__return_false');

                add_filter('the_modified_date', '__return_false');

                add_filter('get_the_date', '__return_false');

                add_filter('get_the_time', '__return_false');

                add_filter('get_the_modified_date', '__return_false');

} add_action('loop_start', 'jl_remove_post_dates');
				
			

2. CSS method

Copy the code below and paste it in the Additional CSS section.

  1. Go the the ‘Admin Panel’
  2. Then to ‘Appearance’
  3. Click on ‘Customize’
  4. Then proceed to ‘Additional CSS’
				
					.entry-meta {

display: none;

}
				
			

Or you can try the code below.

				
					.entry-meta .entry-date.published {

display: none;

}
				
			

3. Theme code method

a. Removing the codes

This method is tedious and can end up damaging your theme. So, before you proceed ensure you back up your theme first.

  1. Go to the ‘Admin Panel’
  2. Then to ‘Appearance’
  3. Click on ‘Editor’
  4. Choose the template file inside the template-parts folder
  5. Select the ‘content.php’  first and remove the code section of the date

b. Editing the codes

This method is tedious and can end up damaging your theme. So, before you proceed ensure you back up your theme first.

  1. Go the the ‘Admin Panel’
  2. Then to ‘Appearance’
  3. Click on ‘Editor’
  4. Look for function calls in your theme’s code: the_date(), echo get_the_date(), the_modified_date(), and the_time(). Like the ones shown below
				
					<?php the_date(); ?>

<?php the_date('F j, Y'); ?>

<?php /echo get_the_date(); ?>

<?php the_modified_date(); ?>

<?php the_modified_date('', 'Last modified '); ?>

<?php the_time( get_option('date_format') ); ?>

<div>Published on <?php the_time( get_option('date_format') ); ?></div>
				
			

Surround the function calls with php comment markers (/* and */); as shown below.

				
					<?php /*the_date();*/ ?>

<?php /*the_date('F j, Y');*/ ?>

<?php /*echo get_the_date();*/ ?>

<?php /*the_modified_date();*/ ?>

<?php /*the_modified_date('', 'Last modified ');*/ ?>

<?php /*the_time( get_option('date_format') );*/ ?>

<div>Published on <?php /*the_time( get_option('date_format') );*/ ?></div>
				
			

Your theme may leave “Published on,” output. You can proceed to delete “Published on” from the ‘content.php’ file of your theme.

4. Plugin method

There are some plugins that can help you remove dates from your posts.

  1. Go the the ‘Admin Panel’
  2. Then to ‘Plugins’
  3. Click on ‘Add New’
  4. Search for ‘date remover’
  5. Select one, install and activate
  6. Then proceed to the plugins settings to configure it
Tags: WordPress
Previous Post

How to customize WordPress RSS feed for Flipboard

Next Post

Kevin Hart Net Worth 2022

Victor Mochere

Victor Mochere

Victor Mochere is a blogger, social media influencer, and netpreneur creating and marketing digital content.

Related Posts

How to hide your likes on TikTok videos
Life Hacks

How to hide your likes on TikTok videos

Victor Mochere - Banner
Life Hacks

How to stay safe online

How to beat the winter season
Life Hacks

How to beat the winter season

How to avoid copyright infringement on YouTube
Life Hacks

How to avoid copyright infringement on YouTube

How to jump start a car
Life Hacks

How to jump start a car

How to increase your blog traffic
Life Hacks

How to increase your blog traffic

Next Post
Kevin Hart Net Worth

Kevin Hart Net Worth 2022

Leave a Reply Cancel reply

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

I agree to the Privacy Policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trending posts

  • William Ruto Net Worth

    William Ruto Net Worth 2022

    3 shares
    Share 3 Tweet 0
  • Top 10 best gay dating apps 2022

    3 shares
    Share 0 Tweet 0
  • Top 10 highest earning creators on OnlyFans 2022

    4 shares
    Share 0 Tweet 0
  • How to activate Microsoft Office on Mac for free

    1 shares
    Share 0 Tweet 0
  • Best sites to watch or download movies for free

    4 shares
    Share 4 Tweet 0

Follow us

  • 12.8k Followers
  • 2.1k Followers
  • 450k Subscribers

Download our app

Google-play Shopping-bag Amazon

Newsletter

Subscribe to our newsletter and get the latest posts delivered to your inbox.

*We hate spam as you do.

Write for us

If you want to get published on victor-mochere.com, please send us your article using this form.

Send us a topic

If there’s a topic you want to see published on victor-mochere.com, please send it to us using this form.

Report a correction or typo

We are committed to upholding our editorial standards, including accuracy. Our policy is to review each issue on a case by case basis, immediately upon becoming aware of a potential error or need for clarification, and to resolve it as quickly as possible. If you notice an error or typo that needs correction, please don’t hesitate to contact us for immediate action.

Editorial policy

Permission to use quotations from any article is granted subject to appropriate credit of the source being given by referencing the direct link of the article on Victor Mochere. However, reproducing any content on this site without explicit permission is strictly prohibited.

Disclosure

Our content is reader-supported. This means if you click on some of the ads or links on this website, then we may earn a commission.

Victor Mochere

Victor Mochere is one of the biggest informational blogs on the web. We publish well curated up-to-date facts and important updates from around the world.

Find us on

Newspaper Flipboard

Topics

  • Business
  • Education
  • Entertainment
  • Flacked
  • Governance
  • Life Hacks
  • Living
  • Sports
  • Technology
  • Travel
  • Uncategorized
  • Wealth

Follow us

Facebook-f Twitter Instagram Pinterest Linkedin Youtube Telegram Rss

Download our app

Google-play Shopping-bag Amazon
  • Advertise
  • Coupons
  • Disclaimer
  • Copyright
  • DMCA
  • Cookies
  • Privacy Policy
  • Write For Us
  • Send us a topic
  • Contact

© 2022 Victor Mochere. All rights reserved.

en
afsqam ar hy az eu be bn bs bg ca ceb ny zh-CN zh-TWco hr cs da nl en eo et tl fi fr fy gl ka de el gu ht ha haw iw hi hmn hu is ig id ga it ja jw kn kk km ko ku ky lo la lv lt lb mk mg ms ml mt mi mr mn my ne no ps fa pl pt pa ro ru sm gd sr st sn sd si sk sl so es su sw sv tg ta te th tr uk ur uz vi cy xh yi yo zu
No Result
View All Result
  • Topics
    • Wealth
    • Business
    • Education
    • Travel
    • Technology
    • Living
    • Entertainment
    • Governance
    • Sports
    • Life Hacks
  • About
    • Victor Mochere Bio
  • Archives
  • CPA Notes
  • Digital Marketing
  • Social Media Policy
  • Sitemap
  • Login
  • Sign Up

© 2022 Victor Mochere. All rights reserved.

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

*By registering onto our website, you agree to the Privacy Policy.
All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Cookie Policy.
pixel