Blog is showing current date instead of published date.
SOLVE
Hi Everyone 🙂
I'm having this issue where when viewing blogs, the date reflects the current date and not the actual published date. I have another line of code temporarily in to preview, and it shows a completely wrong date. While viewing a blog archive, everything is correct.
Any tips?
Thanks.
Design Manager view of template used for individual blogs
Please use the below snippet to display actual published date <div class="blog-post__meta"> <time datetime="{{ content.publish_date }}" class="blog-post__timestamp"> {{ content.publishDate|datetimeformat('%B %e, %Y') }}
</time> </div>
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Please use the below snippet to display actual published date <div class="blog-post__meta"> <time datetime="{{ content.publish_date }}" class="blog-post__timestamp"> {{ content.publishDate|datetimeformat('%B %e, %Y') }}
</time> </div>
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Blog is showing current date instead of published date.
SOLVE
Hey @AlixOfCanada, I believe on certain of the older templates, i've noticed that with blogs they used to have a default date that wasn't the publish date. But once it was published it would show the correct date on the frontend. Are you looking at a preview link of the post or the live link?
Blog is showing current date instead of published date.
SOLVE
Hey 🙂
Here's an example of what one of our posted blogs looks like. Note that this screenshot is outside the preview and the blog was actually posted on the 18th.