How to add "page.updated_at" in each page

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

up!!

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

@LitCommerce thanks for this! it works perfect!

Hi @SHIBdev ,

If you have any difficulty, you can contact me :slightly_smiling_face:

Happy to help you

1 Like

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.