How to Display Today’s Date in WordPress?


3 Different Ways to Automatically Show Today’s Date in WordPress
Allison Hanson

In this post, I’ll lay out three different methods for how to show today’s date in WordPress. First, I’ll show you one of the few working plugins with this functionality. Then, I’ll give you a quick tutorial on how to create your own shortcode. And finally, I’ll round things out with two different code snippets you can use to add today’s date directly to your theme’s template files.

How to Show Today’s Date in WordPress
Ashlee Griggs

When the WordPress customizer appears, you’ll see a variety of options on the left side. The customizer allows users to change the look of a theme in most cases. These are the controls for your theme. Some will have more options available than others. It will be in this section where you will look for a control that reads, “Show Date.” Of course, this may be different depending on the theme you are using.

WordPress.org
Milda Layman

If I am correctly viewing the theme (“specific”) code in template-tags.php, it’s a modified version of what apparently would “normally” (WordPress, “generally”) be found in functions.php. If I had obtained a “general” answer pointing me to that file, I could have “applied” the general answer to my specific situation, by searching for code like it or similar to it, in the theme. It is in that sense that this situation is both general and specific, and it is in that sense I sought to get a general answer, because the history of this area indicated to me that a specific answer was not likely to be forthcoming. I still doubt that I would have received any answer here if I had not posted elsewhere first, but we’ll never know. Nevertheless the help is deeply appreciated.

Be the first to comment

Leave a Reply

Your email address will not be published.


*