Change my post timestamps to a custom format

Blogger offers some built-in options for a post timestamp, but if you want to use a format that is custom, you can do so by overriding the postTimestamp in your template's Blog widget.
  1. Head to blogger.com => (Your blog) => Theme => Edit HTML
  2. Hit 'Jump to Gadget', select Blog.
  3. Inside the <b:widget> tag, add the following snippet.
  4. Replace "MMM dd" with the desired format
<b:includable id='postTimestamp'>
  <span class='byline post-timestamp'>
    <data:byline.label />
    <b:if cond='data:post.url'>
      <meta expr:content='data:post.url.canonical' />
      <a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'>
        <time class='published' expr:datetime='data:post.date.iso8601' expr:title='data:post.date.iso8601'>
          <b:eval expr='data:post.date format "MMM dd" '/>
        </time>
      </a>
    </b:if>
  </span>
</b:includable>

For more information on the format operator, see this date data documentation.

Happy formatting!

Comments

Post a Comment

Popular posts from this blog

Rotate my Blogger images

Remove the header image for posts in Emporio

Get nicer thumbnails for my Post snippets