Publish Date not accurate on blog listing page

SOLVE
Highlighted
Occasional Contributor

I've created a blog listing page for my client:

http://blog.j2interactive.com/

 

I've added the code to show the published date: <div class="post-date">{{ content.updated|datetimeformat('%B %e, %Y') }}</div>.

It's showing the correct format for the date, but it's not showing the correct published date. Please take a look at these screenshots that show the listing page and the Design view of blog posts.

ListingPage_ScreenShot_01.pngListingPage_ScreenShot_02.png

 

It would be great if someone would help determine how to fix this.

 

Thanks, Chris

 

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Occasional Contributor

I found the error in my code. I was showing the "Content-Updated" date and not the "Published Date". Rookie mistake. This is the code that I am now using in my listing page which correctly shows the published date:

<div class="post-date">{{ content.publish_date|datetimeformat('%B %e, %Y') }}</div>

 

Hopefully this will help someone in the future.

 

Chris

3 Replies 3
Highlighted
Occasional Contributor

I've had to remove that code from the listing page because the client doesn't want to see incorrect dates. Hopefully this information is enough to help troubleshoot this.

Reply
0 Upvotes
Highlighted
Occasional Contributor

I found the error in my code. I was showing the "Content-Updated" date and not the "Published Date". Rookie mistake. This is the code that I am now using in my listing page which correctly shows the published date:

<div class="post-date">{{ content.publish_date|datetimeformat('%B %e, %Y') }}</div>

 

Hopefully this will help someone in the future.

 

Chris

Highlighted
Occasional Contributor

Writing from the future—this helped me. Thank you.