Showing post updated date

Hi guys, can you pls help me with the displaying of the updated post date in Casper? I’ve tried doing it several times by adding updated_at to the date parameter in post.hbs. I restarted Ghost but the new date didn’t show up. Many thanks for any help.

FYI it always helps to show the code you are trying to use so that others can see what might be wrong, without the code it’s rather difficult to pinpoint where the issue is :slight_smile:

As far as showing the updated date rather than the published date goes, it should be a case of changing this line to:

<time class="byline-meta-date" datetime="{{date updated_at format="YYYY-MM-DD"}}">{{date updated_at format="D MMM YYYY"}}</time>

(note that there are two uses of {{date}} that need switching to use the updated_at value.


Thanks @Kevin so much! :slight_smile: There was a bit of restart issue on the server & I did only put 1 in the 2 {{date}} uses. Working well now, Very grateful for your help.

Hi @Kevin, is there a way to show both the original publish date and then an updated post date, if there is one please? Similar toe th example below. I go back sometimes to old posts to revise them (or make corrections).

I currently have just the standard original date in the post.hbs. No worries if this isn’t possible, I searched the forum to see if this was answered previously but I couldn’t find a similar thread.

            <time datetime='{{ date format='YYYY-MM-DD' }}'>{{ date format='DD MMMM YYYY' }}</time> .
            <span>{{ reading_time minute=(t '1 min read') minutes=(t '% min read') }}</span>

You can use {{date updated_at format='DD MMMM YYYY'}}

1 Like

Thank you so much, it works a treat.