This post contains affiliate links. Which means I will make a commission at no extra cost to you should you click through and make a purchase. Read the full disclosure here.
Ever wondered how to add a post date to your WordPress blog? Having this extra snippet might not seem like much at a glance. But as a reader knowing the post date for an article can be important for saving time by avoiding old information that isn’t relevant anymore.

Sometimes depending on the theme you are using, there isn’t any visible publish date. So, what should you do if your theme doesn’t have one? Do you forget about it or change your theme?
The answer is, neither. Adding your own custom post date is as easy as connecting Google Analytics to your blog. And I’ll walk you through exactly how to implement it yourself below. You can even copy and paste the code I provide. No editing necessary!
Requirements For This Method
You’ll need a few tools to be able to implement my method. Such as:-
- The code on this page
- A WordPress.com website
- A Genesis Theme
- The Genesis Simple Hooks Plugin installed
Adding The Post Date
Once you have all the above requirements ready. We can start with adding the post date.
For starters, make sure you are signed in to your WordPress.com dashboard.
Using the left-hand menu go to Genesis > Simple Hooks.
A page like the below should appear:

There will be several more empty text boxes if you scroll down this page. If you’ve already had this plugin installed previously there may be code in some of these text boxes. This is perfectly fine and you can add the post date code underneath any existing code.
You can add your post date to several different hooks depending on where you want it to display. There are over 50 hooks but not all are practical for adding a post date.
Let’s start off with one example and then look at the different options available.
Ok, so here is the basic code you’ll need to paste in:
<p>Published on: <?php the_time('m/j/y g:i A') ?></p>
You’ll want to copy and paste this code into the text box directly below genesis_entry_header Hook.
Make sure to also tick Execute PHP on this hook?
Like this:

Scroll down until you find the Save Changes button and click it.
After a moment the server should have updated. When you refresh your post you should see your new post date. Depending on your browser (usually Chrome), you may need to clear your cache to see the change.
Here’s what this looks like on my current Market Theme.

Different Post Date Position Options
Adding your post date near the top of the page makes the most sense. But what other places can you put the post date? Well, there are a few practical options I’ve seen other blogs use.
After testing through there different hooks there are a few other options you can try depending on your preferences.
All you need to do for these is move your code into the text box, tick Execute PHP on this hook? and click Save Changes.
If you wanted your post date at the bottom of your article, you could use genesis_entry_content Hook.
By filling in the text box with the code:
<p>Published on: <?php the_time('l, jS F Y g:i A') ?></p>
It would look like this on your page, showing the post date at the bottom, below the related posts section.

By the way, you may have noticed this code is different from the previous one. This is because the date and time are formatted slightly differently. I’ll cover this in detail later, for those who want to customize this. Or simply understand it better.
Next, if you paste this code into the genesis_before_entry Hook the post date would appear above the title.
Here’s what it looks like using my Theme.

Or lastly adding this code to genesis_before_content Hook will look like this:

In these last 2 examples, you might want to centre the text. In which case you could copy and paste this version of the code instead.
<p>Published on: <?php the_time('l, jS F Y g:i A') ?></p>
Note: If you use this code in genesis_before_content Hook it will be centred based on the entire page rather than the main content area.
Post Date Formatting Options
Once you’ve decided where to place your post date, the next step is to decide how to format it.
Let’s look at the last code example again.
<p>Published on: <?php the_time('l, jS F Y g:i A') ?></p>
To begin with, you can change Published on: to any text you like.
WordPress Post Date & Time Formatting Characters
In the above code, you will also notice (‘l, jS F Y g:i A’) – all of the letters between the single quotation marks are different parts of the time and date.
We can break it down like this:
- l – is the full weekday name with the first letter capitalized, so Monday.
- , – is read exactly as it is, so use it to add any commas you like for formatting.
- j – is read as the day of the month in number format, without any proceeding 0’s. This shows as 26 in the example.
- S – is read as st, nd, rd, or th for the number. In this example, it shows as th, because the date is the 26th.
- F – is read as the full written month – so March in the example.
- Y – is read as the full year. This is 2020 in the example.
- g – is read as the hour, in 12-hour format with no extra 0’s before the numbers. In this example, it is 5.
- : – is read exactly as it is, so it can be used to format minutes and seconds.
- i – is read as the minutes with proceeding 0’s. So, 04 here.
- A – lastly is read as AM or PM, for lowercase versions you can use a.
These altogether make Monday, 26th March 2020 5:04 PM.
You can find the full list of formatting characters here.
Premade Examples To Copy & Paste For Yourself
In case you don’t want to come up with your own settings, here are a few variations you can quickly copy and paste:
Monday, 26th March 2020 5:04 PM
<p>Published on: <?php the_time('l, jS F Y g:i A') ?></p>
26th March 2020 5:04 PM
<p>Published on: <?php the_time('jS F Y g:i A') ?></p>
Mon 26th March 2020, 17:04:39
<p>Published on: <?php the_time('D jS F Y, H:i:s') ?></p>
26 Mar, 2020
<p>Published on: <?php the_time('j M, Y') ?></p>
26/03/20
<p>Published on: <?php the_time('d/m/y') ?></p>
03/26/2020
<p>Published on: <?php the_time('m/d/Y') ?></p>

Adding Custom Text Between The Post Date & Time
Here’s another code example.
<p>Published on: <?php the_time('jS F Y') ?> at <?php the_time('g:i A') ?></p>
Which looks like the below screenshot. You can change the at to whatever text you want.

You can even add inline CSS styles, such as:
<p style="color: #737373;">Published: <?php the_time('jS F Y') ?> at <?php the_time('g:i A') ?></p>
Which would look like this:

If you know a little of CSS then you can style your text however you want. Don’t worry if you don’t though. As your Theme will apply some default styles so it fits in with the rest of your blog.
Bonus: Dynamically Display A Modified Date
So far, the code we’ve added will add a post date to all your blog posts. But, what if you update these posts – wouldn’t it be handy to show visitors the content has been recently updated?
Chances are you wouldn’t want a modified date on every post though. Selectively showing a modified date sounds difficult, right? Don’t worry though it’s super easy to do with the code I will give you.
Not convinced? Try it for yourself.
Copy & paste this code into the hook you selected previously. You will want to overwrite any previously added code with this new snippet. I will be adding mine to the genesis_entry_header Hook.
<p style="color: #737373;">Posted: <?php the_time('jS F Y') ?> at <?php the_time('g:i A') ?><?php
if ( is_single($post) has_tag( 'updated' )) {echo ' | Updated: ', the_modified_date('jS F Y');} ?></p>
Once you have saved this, you only ever need to add a WordPress tag called updated to your modified posts. When you add this tag to a post the published and modified dates will look similar to this:

To Sum Up!
Here we’ve gone through how to add a post date to all your posts in WordPress using the Genesis Framework. There’s even bonus code to easily add a modified date to your posts. To let readers know that you’ve updated your content. Which is a super important practice that bloggers should do regularly.
It is also vital to have published dates on posts so readers can easily tell how relevant content is to them. Some information changes fast, so it’s important for visitors to be reading the most recent information. It’s great if you can show them your information is relevant and up-to-date.

Adding a post date to your blog posts is optional. But at the very least it is something everyone should consider and decide for themselves.
I know myself from experience when browsing other people’s posts and discovering it conflicts with other information I’ve seen. The first thought I have, is – When was it posted? As it can help clarify whether one post is old or not. It’s frustrating as a visitor when there isn’t a post date.
Also, if you are not seeing an example that fits your needs and you are not sure how to go about it. Then let me know as I’d be happy to create some more examples!
Check out this customizable & simple way to add published and modified post dates into your #WordPress #genesis themes Click To Tweet