Wednesday, June 17, 2009

How To Show The Post Date On Every Post

From this tutorial, you will be able to show the post date on every last one of your posts. As we all know, Blogger’s default templates only show a single date for every post that was posted that day. Some readers will find it convenient to have that quick glance at the date on each post, but some will not even notice. This tutorial is definitely handy if you plan to use a calendar icon as your post date, since the timestamp can be modified. As always, make sure you download your current existing template just in case it doesn’t turn out as expected.

Steps to follow:
1. Login to your Blogger dashboard.
2. Go to Layout > Edit HTML (click on “expand widgets” box)
3. Now search for the red line of code or similar code:

Note: If you can’t seem to find the line in red, try the second section code in blue.

<div class='post-feeds'>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'>
<data:post.dateHeader/>
</h2> </b:if>
<b:include data='post' name='post'/>

4. Next, replace the section code above in green with the section code below:

<div class='date-header'>
<data:post.timestamp/>
</div>

5. Preview, and if all looks good, Save Template.

Note: You can modify your timestamp by clicking on the settings tab > formatting. Change the setting under timestamp format to your desired option.

Labels: , ,

7 Comments:

Blogger Öz said...

This is very useful but I have a huge problem.
My code does not look like this and i really Suck at html/xhtml.
Could you please please help me figure it out?

This is my code:

<> replaced by ()

(b:includable id='post' var='post')

(div class='post uncustomized-post-template')

(div class='title')
(a expr:name='data:post.id'/)
(b:if cond='data:post.title')
(div class='date')(span) (b:if cond='data:post.dateHeader')
(data:post.dateHeader/)
(/b:if) (/span)(/div)
(h2 class='title')
(b:if cond='data:post.link')
(a expr:href='data:post.link')(data:post.title/)(/a)
(b:else/)
(b:if cond='data:post.url')
(a expr:href='data:post.url')(data:post.title/)(/a)
(b:else/)
(data:post.title/)
(/b:if)
(/b:if)
(/h2)

Please help me!

July 05, 2009  
Blogger p.win said...

Hey Oz, I would be glad to help you out, but as always make sure you download your current existing template just in case it doesn’t turn out as expected.

***<> replaced by ()

Replace the section code below:

(div class='date')(span) (b:if cond='data:post.dateHeader')
(data:post.dateHeader/)
(/b:if) (/span)(/div)

with this:

(div class='date')
(data:post.timestamp/)
(/div)

Preview, and if all looks fine, Save.

Note: If your date is now appearing twice, you need to search for the section code below and make sure it doesn't appear twice on your coding, if it does delete the duplicate copy(not the one you just added):

(data:post.timestamp/)

Because this is a timestamp rather then the actual date header itself. Since Blogger can't display the date header in every post, the timestamp is, so becareful not to have duplicate timestamp section code in your template.

July 05, 2009  
Blogger procrastistamper said...

Thanks for posting this, I was getting so annoyed with it, and couldn't find any other way to show the actual date on every post!

July 06, 2009  
Blogger p.win said...

your welcome procrastistamper, haha i was just there, so its only right to share it with others

July 06, 2009  
Blogger Gene Zarnick said...

Could you please help me as well. I just created my blog from a template and I don't have "dateHeader" anywhere.

You can see the code at www.favredollarfootlongs.com

I would be greatly appreciated.

Thanks

August 27, 2009  
Blogger p.win said...

hey gene, your post header is appeared as:

< div class='date' >

September 01, 2009  
Blogger sherlina halim said...

Pengen yang lebih seru ...
Ayo kunjungi wwwasianbet77com
Buktikan sendiri ..

Real Play = Real Money

- Referal 5 + 1 % ( seumur hidup ) .
- Cash Back up to 10 % .
- Bonus Royalty Rewards setiap bulan .

untuk Informasi lebih jelasnya silahkan hubungi CS kami :
- YM : op1_asianbet77@yahoo.com
- EMAIL : asianbet77@yahoo.com
- WHATSAPP : +63 905 213 7234
- WECHAT : asianbet_77
- SMS CENTER : +63 905 209 8162
- PIN BB : 2B4BB06A / 28339A41

Salam Admin ,
http://asianbet77.com/

June 03, 2015  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home