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

Bentcorner

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

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.

Subscribe to Bent Corner

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

How To WordPress

Primary Sidebar

  • Facebook
  • Instagram
  • 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

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

Credit Card Chargebacks and Pokémon Cards

Did Donald Trump break his promise not to start a new war?

DC Comics cuts ties with Diamond Comic Distribution

Currently Listening To

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