CMS Development

csbeck
Participant

Publish Date not accurate on blog listing page

SOLVE

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

 

0 Upvotes
1 Accepted solution
csbeck
Solution
Participant

Publish Date not accurate on blog listing page

SOLVE

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

View solution in original post

3 Replies 3
csbeck
Solution
Participant

Publish Date not accurate on blog listing page

SOLVE

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

tdunlavey
Participant

Publish Date not accurate on blog listing page

SOLVE

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

csbeck
Participant

Publish Date not accurate on blog listing page

SOLVE

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.

0 Upvotes