I would like to display the date that the site was last updated. This date is the same as the last entry added to a specific category. Thanks in advance.


You can order entries by dateUpdated in descending order and then get the first entry. You would use that entries dateUpdated field to show when the site was last updated.

{% set entry = craft.entries.order( 'dateUpdated desc' ).first() %}
{{ entry.dateUpdated }}
  • As a side note to this answer when I needed to do this I had to change order to: .order('elements.dateUpdated desc') – John Moylan May 24 '16 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.