SHIBdev
November 12, 2021, 8:27am
1
Hi there community, im trying to get last updated date on each page, but unfortunatly there is no updated_at object on page.liquid..
i managed to get date from now.. but i cannot make it to get desired date..
Última actualización: {{ "now" | date: "%Y-%m-%d %H:%M" }}.
"updated_at": "2008-07-16T20:00:00-04:00"
https://shopify.dev/api/admin-rest/2021-10/resources/page#resource_object
Anyone is able to help me? in advance thanks !
2 Likes
Hi @SHIBdev ,
Please add code: {{ page.published_at }}
Returns the timestamp of when the page was created. https://i.imgur.com/zEItMCC.png
Hope it helps!
4 Likes
SHIBdev
November 12, 2021, 3:27pm
4
@LitCommerce thanks for this! it works perfect!
Hi @SHIBdev ,
If you have any difficulty, you can contact me
Happy to help you
1 Like
MVUILL
June 16, 2022, 3:44pm
6
Hi! I tried to use {{ page.published_at }} and it’s not working. I’m on Dawn theme, is it another name? Does anyone also has the field name for the last updated date (for a page)?
Hi @MVUILL ,
You can create a question on the community and send me the link. I will check it.
Because this will help build a better community.
Thank you.