CMS Development

jjokinen
Colaborador(a)

Custom 'Updated' Time Stamp for Blog Posts

resolver

Hi!

 

I found this article on the subject but seems like the actual code snippet is missing from there. Does anybody have the snippet available for sharing?

 

https://blog.hubspot.com/customers/writing-a-custom-updated-timestamp-for-blog-posts

 

Thanks in advance!

 

Joel

1 Solução aceita
Gonzalo
Solução
Top colaborador(a) | Parceiro Diamante
Top colaborador(a) | Parceiro Diamante

Custom 'Updated' Time Stamp for Blog Posts

resolver

If you are looking to display the last updated date instead of the published date on a post page you can use the following:

{{ content.updated|datetimeformat('%B %e, %Y') }}

 

 

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting

Exibir solução no post original

6 Respostas 6
Gonzalo
Solução
Top colaborador(a) | Parceiro Diamante
Top colaborador(a) | Parceiro Diamante

Custom 'Updated' Time Stamp for Blog Posts

resolver

If you are looking to display the last updated date instead of the published date on a post page you can use the following:

{{ content.updated|datetimeformat('%B %e, %Y') }}

 

 

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting
TitiCuisset
Gerente da Comunidade
Gerente da Comunidade

Custom 'Updated' Time Stamp for Blog Posts

resolver

Hi @jjokinen 

 

Thank you for reaching out. I have reached out to the team for this missing part. 

 

As for your question, wondering if some of our top experts would already have the answer - @Kevin-C @DanielSanchez @Gonzalo do you have any thoughts on that for @jjokinen ? 

 

Thank you!

Best

Tiphaine


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

jjokinen
Colaborador(a)

Custom 'Updated' Time Stamp for Blog Posts

resolver

Hi @TitiCuisset,

 

Thanks! Did you hear anything back from the team?

And thanks @Gonzalo for the snippet! Would you use that in the exact same way as the article instructs? 

TitiCuisset
Gerente da Comunidade
Gerente da Comunidade

Custom 'Updated' Time Stamp for Blog Posts

resolver

Hey @jjokinen 

 

Thank you for your reply

 

The team is looking into it but I haven't gotten an update just yet, I'll share that here once I have!

 

Thank you

Best

Tiphaine


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

0 Avaliação positiva
TitiCuisset
Gerente da Comunidade
Gerente da Comunidade

Custom 'Updated' Time Stamp for Blog Posts

resolver

Hi @jjokinen 

 

Apologies for the delay here. Got an update from the team, the snippet in the blog post would be: 

{% set update_time = content.updated %}
{% set offset = <your offset> %}
{% set new_time = update_time + offset %}

 

Thank you!

Best

Tiphaine


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

Gonzalo
Top colaborador(a) | Parceiro Diamante
Top colaborador(a) | Parceiro Diamante

Custom 'Updated' Time Stamp for Blog Posts

resolver

If the time is important in your context then yes, you would want to customize the date format filter adding the time and follow the post to replace for the right timezone, otherwise I would say is not that important 🙂

If this answer helps you to solve your questions please mark it as a solution.

Thank you,


Gonzalo Torreras

HubSpot freelance developer

hola@gonzalotorreras.com
www.gonzalotorreras.com
Schedule a meeting