Show Ghost Post Times in AM/PM Format
Some news websites show a post’s time as well as its date. You can show both in Ghost.
Let’s take an example and see how it works.
{{ date published_at format='h:mm A' }}
We passed the format option to the published_at property in this example. The h in the format option means hour, the mm means minutes, and A means AM or PM. This example will give the following result.
10:02 PM
Suppose we want to show AM or PM in lowercase. We can use a instead of A, like in the following example.
{{ date published_at format='h:mm a' }}
10:02 pm
We can use the following if we want to combine this with the regular date format.
{{ date published_at }} - {{ date published_at format='h:mm A' }}
The result will be.
Mar 25, 2020 - 10:02 PM
I hope you find this helpful.
More from the Blog
Latest Ghost Themes
Arish
For visual magazines that lead with photography, film, and selected stories.
Siwa
A personal publication that introduces the writer before inviting readers into the stories.
Hanoi
An image-led magazine for creative stories, rich navigation, and long-form reading.
Taba
A newsroom front page for coverage across topics, video, and story formats.
Marsa
A flexible publication homepage for featured stories, topics, and newsletters.
Hakone
For writers who want readers to browse complete posts on the homepage.