• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Bent Corner

Bent Corner

a smell of wine and cheap perfume

  • Home
  • About Me
  • Contact Me
Home > WordPress > Show the current date in WordPress without a plugin

Show the current date in WordPress without a plugin

30 August 2022

Show the current date in WordPress without a plugin - Bent Corner

I wanted a way of displaying the current date in WordPress. Ideally, I wanted to use a shortcode that would display it.

After I checked out the built-in shortcodes native to WordPress, and verified there was not a shortcode for displaying the current date, I looked for a plugin that did it. I found quite a few plugins that generated a shortcode to display the current date. I then thought about adding yet another plugin to my website just to display the date.

I decided to create it myself without a plugin.

This is what I came up with:

I copied the above code and pasted at the end of the function.php file in my website’s theme folder. I then placed the following shortcode where I wanted the current date to be displayed:

[[display_current_date]]

The result was the following:

[display_current_date]

I formatted the PHP date() function with the following format parameters:

“l” – A full textual representation of the day of the week.
“j” – The day of the month without leading zeros.
“F” – A full textual representation of a month, such as January or March.
“Y” – A full numeric representation of a year with four digits.

If you would like to use this code, but want to change the way the current date gets displayed, you can see a full list of the format parameters by going here.

How To WordPress

Subscribe to Bent Corner

Get an e-mail notification when I publish a new post. Easy like Sunday morning.

Primary Sidebar

  • Facebook
  • Instagram
  • Pinterest
  • Threads
  • Twitter

About Me

My name is Richard Rottman. This is my personal website. It's where I write about the assorted stuff I think is interesting or events I want to comment on. Read More…

Latest Posts

Pokémon has a gambling problem

The A-10 Thunderbolt II is the worst aircraft in the Air Force

Do not act like this unprofessional eBay seller

Logan Paul threatens to sue Rattle Pokemon

Will eBay reseller discrimination be the civil rights issue of 2026?

Your eBay account is restricted!

If you want to sell Pokémon cards, you need to grind

Charlie Kirk’s thoughts about people who join the military

The Dragon Con Policy on AI Art Is so Serious, It’s Secret

Dibdit is Infected with Petty, Ridiculous Reseller Drama

Currently Reading

Carl's Doomsday Scenario (Dungeon Crawler Carl) Book 2
Carl’s Doomsday Scenario (Dungeon Crawler Carl) Book 2

Empire of AI: Dreams and Nightmares in Sam Altman's OpenAI
Empire of AI: Dreams and Nightmares in Sam Altman’s OpenAI

Bent Corner © 2005–2026

Made in Maryland

Bent Corner - MADE IN MARYLAND