How Show Post Date For Blogger Posts Done On Same Day



How To Show The Post Date For All Your Blogger Posts you do on your blog including posts you have done On same day i.e as in blogger you have an option of date-header to show up the date for each post that you have done in blogger to show up when it was posted.But there is only one small problem in this feature,as when we do more than one post on same day the date shows up only for one post,that is last one not for both.So if you have problem with this and interested in displaying the date of post in all posts,you can solve this problem following this tutorial.Check the below image showing two posts of my demo blog which i have done on same day.



You will see as date is being shown for only one post.To solve this follow these Steps:-

1. Login to blogger
2. Click Layout
3. Click Edit HTML tab
4. Check the small box next to the text “Expand Widget Template"
5. Find this code :


<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><data:post.dateHeader/></h2>
</b:if>


6.Remove the code and replace with this one:


<b:if cond='data:post.dateHeader'>
<script>var ultimaFecha = &#39;<data:post.dateHeader/>&#39;;</script>
<h2 class='date-header'><data:post.dateHeader/></h2>
<b:else/>
<h2 class='date-header'>
<script>document.write(ultimaFecha);</script>
</h2>
</b:if>


7. Click "SAVE TEMPLATE".
8. Done

Now it will show date for both posts as below.



Now, all of your posts in the same day will include the date. If you have any problem you can leave your comments.

18 comments:

subagya said...

nice trick you have, just for info you can use <data:post.timestampLabel/> too then go to setting > formatting change it with dd,mm,year format and then put the code in to post body in edit HTML replace <data:post.dateHeader/>

Anshul said...

@subagya you can do many things but i want to make it best and simple solution for bloggers using from default template to customized template and to make it implement easy.

Sedran said...

Thanks a lot! That is useful :)

Kunal A. Desai said...

Thanks Anshul.

I needed this trick.

Durkin said...

awesome! much better than hacking it so the timestamp shows the date.

Matthew B. Richards said...

Thanks, worked great for me!

Arrica Lee said...

I am using the your Glory template. It's splendid. But, I have a question related to this post, I tried to show the post date for blogger posts on the same day by following these instructions but the code is different. Like here it's

"b:if cond='data:post.dateHeader'"

but in the Glory template, it's

"span class='date1'><data:post.dateHeader/"

What must I do now to enable me to see the dates for posts on the same day? Thanks.

Anshul said...

@arrica for glory template
Find <data:post.dateHeader/> and replace with <data:post.timestamp/>
Now your timstamp format will be used to show date which always shows date.

သစၥာ | သ​စ္စာ said...

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "div" must be terminated by the matching end-tag "
".

Bulma said...

Another great tutorial... Many thanks Anshul, Good job!

Aleramo said...

Hi,

I dont find the exact code sequence in my blog, so could you give help please ?
Visit wwww.alassiofutura.com
All good stuff !
regards
A.

Anshul said...

@aleramo atleat u would be getting <data:post.dateHeader/> line if you use date in your blog.replace that.

Meran said...

Hello Anshul,

I tried it but didn't work s expected. When I replaced as per your instruction, it shows date on all post the but the calendar format was missing. How can I show the as the calendar format and make it appear on every post. Hope you can help me.

Below are the codes that I can find in my template;
I have removed < > hope it still makes sense to you

div id='date'
script replace_date('<data:post.dateHeader/');
/script
/div

span class='post-timestamp'
b:if cond='data:top.showTimestamp'
data:top.timestampLabel/
b:if cond='data:post.url'
a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'abbr class='published' expr:title='data:post.timestampISO8601'data:post.timestamp//abbr/a
/b:if
/b:if
/span

Thanking in advance for your assistance.
Cheers!

Anshul said...

@mera the hack is just simple date as shown in blogger for posts not caleneder widget.

Majed said...

This doesn't work on my custom template: http://www.freebie-link.com/

It shows the date using timestamp, but I want to post the time AND date on every post.

Anshul said...

@majed main code to display the date and time are
This for date <data:post.dateHeader/>
This for time <data:post.timestamp/>

Post a Comment