Showing posts with label post body. Show all posts
Showing posts with label post body. Show all posts

Saturday, August 8, 2009

How to add breadcrumbs to your posts

breadcrumbposticon From this tutorial, you will be able to add breadcrumbs navigation to your posts. Having breadcrumbs on your blog will make it easier for your readers to navigate through your page without having to re-search something they might’ve found useful while reading but went ahead and navigated away, planning to come back to it later. Breadcrumbs will provide a route back so your readers won’t get lost while reading and also show their current location.

Steps to follow:

1. Login to your Blogger dashboard

2. Go to Layout > Edit HTML (Click on “expand widgets” box)

3. Search for the following section code: ]]></b:skin>
and add the following section code below right before it:

.breadcrumbs {
float: left;
width: 100%;
font-size: 11px;
margin: 10px 0px 10px 0px;
padding: 0px 0px 3px 0px;
border-bottom: double #EAEAEA;
}

Note: You can modify the appearance of your breadcrumbs using the section code above after you have completed this tutorial.

4. Next, you will need to search for the following section code below:

<b:includable id='main' var='top'>

5. Replace the entire section code with the following section code below:

<b:includable id='main' var='top'>
<!-- posts -->
<div class='blog-posts hfeed'>
<b:include data='top' name='status-message'/>
<data:adStart/>

with…

<b:includable id='main' var='top'>
<!-- posts -->
<div class='blog-posts hfeed'>
<!-- disable default status message<b:include data='top' name='status-message'/>default status message disabled -->
<b:include data='posts' name='breadcrumb'/><data:adStart/>

6. Now immediately before the section code:

<b:includable id='main' var='top'>

copy and paste the following section code:

<b:includable id='breadcrumb' var='posts'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<!-- No breadcrumb on front page -->
<b:else/>
<b:if cond='data:blog.pageType == "item"'>
<div class='breadcrumbs'>
Browse » <a expr:href='data:blog.homepageUrl' rel='tag'>Home</a>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.labels'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast == "true"'> » <a expr:href='data:label.url' rel='tag'><data:label.name/></a> </b:if> </b:loop>
» <span><data:post.title/></span> </b:if> </b:loop> </div>
<b:else/>
<b:if cond='data:blog.pageType == "archive"'>
<div class='breadcrumbs'>
Browse » <a expr:href='data:blog.homepageUrl'>Home</a> » Archives for <data:blog.pageName/> </div> <b:else/>
<b:if cond='data:blog.pageType == "index"'>
<div class='breadcrumbs'>
<b:if cond='data:blog.pageName == ""'>
Browse » <a expr:href='data:blog.homepageUrl'>Home</a> » All posts <b:else/>
Browse » <a expr:href='data:blog.homepageUrl'>Home</a> »
Posts filed under <data:blog.pageName/>
</b:if> </div> </b:if> </b:if> </b:if>
</b:if></b:includable>

7. Next, Preview you template, and if all is working fine, Save Template and your done!

Monday, June 22, 2009

How To Add Read More To All Of Your Posts

From this tutorial, you will be able to add a read more link to all of your posts, old or new. Adding a read more link to your posts can and will save upload time of your blog for your readers. This will be convenient for your readers and definitely keep them happy from the long wait to get the information they need now. This tutorial will be useful for blogs that have long posts. 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 this line of code: ]]></b:skin>
4. Now add the following code right after it:

<style>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
span.fullpost {display:inline;}
<b:else/>
span.fullpost {display:none;}
</b:if>
</style>

5. Next, you will need to search for this line of code: <data:post.body/>
6. Once you have located the code, add all of the following section code right after it.

<!--READ-MORE-STARTS--><b:if cond='data:blog.pageType != &quot;item&quot;'>
<a expr:href='data:post.url'>Read More!</a>
</b:if><!--READ-MORE-STOPS—>

Note: You will be able to modify the text above in orange.

7. Preview the page, and if all is fine, Save Template.

Note: You will not be able to see the Read more link yet, or after step 7.

8. Once you have saved your template, go to Settings>Format. Scroll down to Post template and add the following section code inside of it, then click Save Settings.

<span class=”fullpost”>

</span>

Note: You should now be able to see a Read more link under all your posts.

Note: The way this code works: Everything between the <span class=”fullpost”> and </span> will be the hidden information until the reader clicks on read more, which will bring them directly to the post link. For example: The part in red will be shown, the part in blue will be hidden until readers click read more link.

This part will be shown <span class=”fullpost”> while this part here will be hidden until the reader clicks on the read more link. </span>