Friday, September 18, 2009

Show Date Above Blogger Post Title

Sometimes you may download a Blogger Blogspot template which does not display the date header above the post title.

To Display the Date Header Above Post Title.

1. Log in to Blogger.

2. Go to Layout > Edit HTML.

3. Back up your template before attempting any changes.

4. Type the following into the search box (CTRL + F) to find the block of code beginning with this line:


&ltdata:adStart/>


5. Paste the following lines of code.


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


into the code block as shown here:

<data:adStart/>
<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'/>
<b:if cond='data:blog.pageType == "item"'>
<b:include data='post' name='comments'/>
</b:if>
<b:if cond='data:post.includeAd'>
<data:adEnd/>
<data:adCode/>
<data:adStart/>
</b:if>
<b:if cond='data:post.trackLatency'>
<data:post.latencyJs/>
</b:if>
</b:loop>
<data:adEnd/>
</div>


7. Click the Save Template button.

8. View Blog to see the date above the header.

No comments:

Post a Comment