• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
NameHero® Blog

NameHero® Blog

Web Hosting Tips & Resources From NameHero

  • AI Agents
    • OpenClaw
    • Claude Code
    • n8n
    • Hermes Agent
    • Open WebUI
    • Docker
  • Hosting
    • Web Hosting
    • WordPress Hosting
    • WooCommerce Hosting
    • Enterprise Hosting
    • Email Hosting
    • HeroicGuard
    • GPU Hosting
    • Website Builder
  • VPS
    • Managed VPS
    • Unmanaged VPS
    • Flex VPS
  • Reseller
  • Gaming
  • Domains
  • Account
  • Blog Home
  • Categories
  • Authors

How to Change All Dates At Once in WordPress

Bhagwad Park

Published on: June 21, 2021

Categories: WordPress 0

As a website owner, you want your visitors to realize that your site contains the most up-to-date information. This means that you frequently have to include dates in your titles and content. But let’s be honest it’s not just for visitors, but also search engines. Some of us might wrinkle our nose in distaste at the idea of writing something just for SEO, but it’s a practical necessity. As a result, we’re forced to use dates and sometimes even months throughout our website, and changing them all at once regularly can be tedious. Here’s a quick way to do it in one go.

Including Dates in Content – a Necessary Evil

I’d written a post last year about how Google claims that something isn’t necessary when in reality it very much is! An example of this is dates in content. Like it or not, users often search for something with the date included. So for example, this might search for “best XYZ for 2021”, and in such situations, you have to include the data in your content. Otherwise, you’ll be outranked by your competitors who do the smart thing.

But apart from search, visitors also want to see the data in your title. It creates a feeling of freshness compared to pages that don’t, even though the “dateless” page may be fresher! So as business owners and “do-it-yourself” SEO experts, we have to play the game. Sometimes we need to go so far as to change the month – even if the rest of the content remains the same.

We end up sprinkling dates and months throughout our website, in promo materials and blog posts. And when the month or year changes, we need to make the change everywhere at the same time. It’s not a good idea to use a plugin like “Better Search Replace” because it’s too broad a hammer, and you might end up replacing something you shouldn’t!

A better solution is a plugin called “Custom Website Data”.

Using the “Custom Website Data” Plugin

While this plugin hasn’t been updated in a while, I can attest that it works perfectly with no modifications necessary. Download and install the plugin using the provided link. Keep in mind that because it’s an older plugin, it might not show up, so include the author of the website in your search term “Danny Weeks” and you’ll get it.

Then add a new record for your months, years, and dates like this:

Creating the Dates Shortcodes
Creating the Dates Shortcodes

In the above screenshot, I have a new record called “dates”, and sub-sections called “next_month”, “this_month”, and “this_year”. Each has a value denoted by the equal sign.

Then use the shortcodes instead of the dates in your posts like this:

[cwd ref=”dates” key=”this_year”] for the year, and so forth. Here’s an example of what it looks like in a post:

Using the Dates Shortcodes in Posts
Using the Dates Shortcodes in Posts

Now when you preview your post, you should see that the shortcuts have been replaced by the appropriate values:

Shortcodes Have Been Replaced by Dates
Shortcodes Have Been Replaced by Dates

You can do this throughout your site in areas where you want dates and months to appear. And then when the month changes, or the year changes, you just need to update the record in the Custom Website Data plugin interface, clear your cache, and you’re done! All your pages will update automatically with the new dates. And unlike a blunt tool such as “Better Search Replace”, only those dates will change that you’ve specifically added as shortcodes!

This is just one way to make managing your website easier. Changing dates globally like this is a necessity for SEO – there’s no getting around it. Visitors want dates in content, search engines take note of them, so you have to adjust to realities. So we might as well use a tool that makes our lives easier!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Related Posts

What Is Self-Hosted WordPress?

In this post, we’ll differentiate self-hosted WordPress from WordPress.com, and discuss the benefits of the former.

Blogger vs. WordPress: Which One to Use?

Let's compare WordPress and Blogger across five key areas. Then, we'll show you how to set up a professional blog with WordPress.

Joomla vs. WordPress: Which One Is Better?

In this post, we’ll consider five differences between Joomla and WordPress and how you might go forward with setting up a WordPress website.

How to Eliminate Render-Blocking Resources in WordPress (& Why You Should)

Many things can slow down your site, including render-blocking resources. These are CSS and JavaScript files that delay the loading of content on your site. As a result, visitors will have to wait longer to interact with your page, which could lead to frustration and instant exits.  So, what can you do to eliminate render-blocking […]

Reader Interactions

Leave a Reply Cancel reply

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

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

Primary Sidebar

Follow & Subscribe

Exclusive promos, content and more!


Most Popular Posts

NameHero’s Recommended WordPress Plugin and Theme Setup

WordPress Hosting vs. Web Hosting – What’s The Difference?

How To Increase The InnoDB Buffer Pool Size

How To Fix A Stuck All-in-One WP Migration Import

How To Add A Subdomain In Cloudflare

Top Categories

  • WordPress
  • WordPress Tutorials
  • OpenClaw Hosting
  • Enterprise Hosting
  • WooCommerce
  • Web Hosting
  • Resellers
  • Website Security
  • Website Development
  • Website Performance
  • VPS Hosting
  • SEO Tips
  • Announcements
  • Domain Registration
NameHero

NameHero® proudly provides web hosting to over 40,000 customers with 99.9% uptime to over 750,000 websites.

  • Master Card
  • Visa
  • American Express
  • Discover
  • Paypal
Products
  • Web Hosting
  • Managed VPS Hosting
  • Unmanaged VPS Hosting
  • Flex VPS Hosting
  • WordPress Hosting
  • WooCommerce Hosting
  • Reseller Hosting
  • Enterprise Hosting
  • GPU Hosting
  • Email Hosting
  • HeroicGuard
  • Domains
  • Website Builder
  • AI Agent Hosting
Help & Support
  • NameHero Blog
  • NameHero Gaming Blog
  • Support
  • Help Center
  • Migrations
  • Affiliates
  • Gaming Affiliates
  • Call 1-855-984-6263
Company
  • About Us
  • Contact Sales
  • Reviews
  • Uptime
  • We're Hiring

Copyright © 2026 Name Hero, LLC. All rights reserved.
NameHero® is a registered trademark.

  • Privacy Policy
  • Terms of Use
  • Acceptable Use Policy
  • Payment Policy
  • DMCA