How to change date of updated posts?

If I have a post called ultimate guide to choosing a smartphone in 2021 that was written in January and want to update it in June, how do I change date to say its posted in June so that my readers know its up to date?

In your theme’s post.hbs, look for published_at property and change it to updated_at.

This way, your website will show the last modified dates for the articles instead of first published date.

2 Likes

You can also change the publish date manually for individual posts.

1 Like

Most users will probably need Kevin’s solution but yours is cool.

1 Like

With this solution, will that make the post come up and be seen as new on the home page for example?

No. The page won’t show up on the homepage because the original publish date is not changed here.

However, a big advantage is that whenever you update a post, the date gets updated automatically. And this is reflected in search engines as well. You probably know that users tend to click on results that have recent dates in the SERP.

My website saw a 50% increase in organic traffic after this change.

2 Likes

Thanks! Very useful indeed. I’ll check in the theme I’ll be using and update if needed. :slight_smile:

1 Like

Sure! Good luck for it :slight_smile:

In my post.hbs file there is no published_at entry.

@ahmadajmi it concerns the Penang theme. Are there any reasons for this?

Probably your theme uses some other term or perhaps the term is used in some other file. Penang is from Aspire themes. You paid for it so maybe you could contact their support and ask them how you could display the updated date.

I use Biron Themes and the theme developer helped me with the published_at hint. I thought it was a generic Ghost code term.

1 Like

For Penang, you can pass the updated_at property to the date helper in the /partials/post-header.hbs theme file. For example, {{ date updated_at format='DD.MMM.YYYY' }}

3 Likes