Adding dates to blog posts

We just pushed an addition to Write.as blogs that we’d love for you to see and get your feedback on. It resolves a long-requested feature.

The publish date for blog posts now shows on a post when a collection is set to the “Blog” display format, making individual post pages consistent with the blog’s index page. Here is what it looks like on such a a blog post:

Customizing

Styling how this publish date appears is easy. Go into your blog’s Customize settings, scroll down to “Custom CSS”. and use the following code as a template:

/* Publish Date */ 

body#post article time.dt-published, body#subpage article time.dt-published {
  color: black;
  font-style: italic;
}

Don’t want the published date?

If you don’t want the published date to appear at all, feel free to change your blog’s Display Format to “Notebook.” This keeps the blog in a reverse chronological order while removing the publish dates on the blog posts and index page

1 Like

Perfect timing. I was looking for a way to make publish dates appear on a post because it throws me off whenever I get a random post from my site and not have context on when it was published. I was thinking I could do it by using Javascript to get the published date from the meta properties, but this takes away the need to do that, awesome!

1 Like

I just added the CSS code to my blogs. It works perfectly.
Thank you very much!

1 Like

This did not work for me. First I got a couple of error messages saying that body was over-qualified and should be removed. So I did that, but still don’t see dates.

I am using the Novel Display Format. Is that why? Or something else?

If the Novel format is the problem, any alternative custom css that would work?

Hi @economic-networks – you can safely ignore the warning about the body. But the Novel display format hides dates, which is why the custom CSS doesn’t work.

Would you like to see a display format similar to the Novel format, where posts are in chronological order but the dates show up?

Yes please. I already have requests for dates on posts, but the whole thing wants to be read more like a book than newest-post-first.