How to Display Today’s Date in WordPress
August 15. 2022
If you display today’s date on your WordPress website, you will give the impression that the website is up-to-date and relevant. But how can you display today’s date on your website? We asked experts from WP Full Care and they revealed three simple methods to do this. But first, let’s find out why should you display today’s date on your site in the first place.
Why should you display today’s date on your WordPress website?
You probably noticed that many news websites display the current date in the header section of their websites. This is especially true with smaller news sites that post their primary items on a daily basis. This is so their users may rest easy knowing they’re looking at the most recent online edition. Similarly, blogs and online journals have adopted this format as well. As a result, visitors to the blog could rest comfortably that they were seeing the most recent entries.
But there are more ways you can benefit if you display today’s date on your WordPress website. For example, if your live chat is only available during particular hours and you want to display the time zone for consumers. Or, you can build excitement around your new campaign by adding a countdown timer to your website.
Remember that, no matter how many years have passed since you last posted on your website, its current date lends an air of relevance to your content. However, this doesn’t mean you should give up on posting current information. Even if you can’t do it daily, make sure to regularly update your WordPress website and keep your content fresh. After all, people can tell when you’re talking about something from 10 years ago.
3 simple methods to display today’s date in WordPress
Now let’s take a closer look at how to display today’s date, day, or current time on your website. In this article, we’ll explain three methods, all suitable for beginners:
- Display today’s date on your WordPress website by installing a plugin
- Show today’s date on your WordPress website using a specific theme
- Add today’s date to your WordPress website by using code
Display today’s date on your WordPress website by installing a plugin
You’d think that a plugin to display the date and time of the current day would be readily available. However, the problem is that there aren’t a lot of people specializing in this. The reason is probably that you can add it with code or because most websites simply don’t want to show just today’s date. But we’ve already explained the benefits that come with displaying today’s date on your website.
One of the simplest plugins you can use for this purpose is WP Time and Date Shortcode plugin. The date can be displayed in the past, present, or future using this plugin. However, you will need to use a shortcode to complete this. Also, keep in mind that this plugin has two major setbacks. First, it leaves the date and time as displayed by WordPress on all of your posts. On top of that, you would need to manually edit each post and add the shortcode to it.
Show today’s date on your WordPress website using a specific theme
Many of the WordPress themes available offer the ability to display today’s date without the need for any coding. For example, the popular ColorMag theme provides an option that you can switch today’s date on or off at any time. Make sure to double-check your theme and see if you have this option available. Unless, of course, you’re using a custom-made WordPress theme for your website. Now let’s find out if your theme gives you the option to display the current date.
Go to “Appearance” and then click on “Customize” to access a number of options. You’ll be able to find all settings available however, they will vary depending on the theme you’re using. If your WordPress theme supports this feature, here you’ll be able to find the “Show Date” option. However, if you can’t see this setting, perhaps it’s just the way your theme is configured and you might need to look further.
To begin, see if this feature is supported by your theme by looking in the “Header Options” section. This is where the majority of date controls are located. If you can see the “Show Date” feature there, you can add it to your theme’s appearance by clicking the “Save and Publish” button. Now you can close the customizer by clicking the “X” in the upper-left corner after the changes have been saved. It’ll bring you back to the WordPress admin panel.
Keep in mind that no two themes are exactly alike when it comes to allowing users to make adjustments. A peek at the theme customizer may show you that it offers considerably more features than you previously imagined. Social media sharing buttons and other tiny and useful tools may also be included in some.
Add today’s date to your WordPress website by using code
The third method to display today’s date in WordPress is a little more difficult for individuals who aren’t familiar with the ins and outs of website coding. As a result, we can only provide you with general guidelines on how to apply this technique.
Let’s start with the code:
<?php echo date(get_option(‘date_format’)); ?>
In WordPress, the current date and time will always be displayed using this code based on your time format. Changing the format is as simple as changing the format options rather than the code. In this case, the issue isn’t with the code itself, but with where it is located. Because each theme’s source code is unique, the file to which you must add this code will vary from theme to theme. So be patient as finding the ideal spot for this excerpt may necessitate some trial and error.
As you can see, it’s quite easy to display today’s date on your WordPress website, even if you are a complete beginner. However, you can always do the smartest thing and reach out to WP experts who’ll not only help you with this but make sure your WordPress website is always operating at its best.