Breadcrumbs or breadcrumb is important for the blogger as it helps readers to keep track their location. The breadcrumb display the location like this :
Home » Label » Post Name Once you will done adding breadcrumbs to your blog it will also displayed to the Google search result as breadcrumbs mark up. as this code is fully updated with the latest version. so, just follow the simple steps given below to add breadcrumb to your blog.
Preview : How to Add Breadcrumb to Blogger?
1. Go to
Blogger Dashboard > Template > Edit HTML2. Now in the Template, Look for
<b:include data='top' name='status-message'/>
Then, immediately above that, paste this line of code
<b:include data='posts' name='breadcrumb'/>
3. Next, Look for
<b:includable id='main' var='top'>
If you find two occurrences of this, then locate the second one(locate the only one otherwise) and immediately above that paste below snippet of code
<b:includable id='breadcrumb' var='posts'>
<b:if cond='data:blog.homepageUrl != data:blog.url'>
<b:if cond='data:blog.pageType == "static_page"'>
<div class='breadcrumbs'><span><a expr:href='data:blog.homepageUrl' rel='tag'>Home</a></span> » <span><data:blog.pageName/></span></div>
<b:else/>
<b:if cond='data:blog.pageType == "item"'>
<!-- breadcrumb for the post page -->
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.labels'>
<div class='breadcrumbs' xmlns:v="http://rdf.data-vocabulary.org/#">
<span typeof="v:Breadcrumb"><a expr:href='data:blog.homepageUrl' rel="v:url" property="v:title">Home</a></span>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast == "true"'>
» <span typeof="v:Breadcrumb"><a expr:href='data:label.url' rel="v:url" property="v:title"><data:label.name/></a></span>
</b:if>
</b:loop>
» <span><data:post.title/></span>
</div>
<b:else/>
<div class='breadcrumbs'><span><a expr:href='data:blog.homepageUrl' rel='tag'>Home</a></span> » <span>Unlabelled</span> » <span><data:post.title/></span></div>
</b:if>
</b:loop>
<b:else/>
<b:if cond='data:blog.pageType == "archive"'>
<!-- breadcrumb for the label archive page and search pages.. -->
<div class='breadcrumbs'>
<span><a expr:href='data:blog.homepageUrl'>Home</a></span> » <span>Archives for <data:blog.pageName/></span>
</div>
<b:else/>
<b:if cond='data:blog.pageType == "index"'>
<div class='breadcrumbs'>
<b:if cond='data:blog.pageName == ""'>
<span><a expr:href='data:blog.homepageUrl'>Home</a></span> » <span>All posts</span>
<b:else/>
<span><a expr:href='data:blog.homepageUrl'>Home</a></span> » <span>Posts filed under <data:blog.pageName/></span>
</b:if>
</div>
</b:if>
</b:if>
</b:if>
</b:if>
</b:if>
</b:includable>
This code will only display the last label of the post in the breadcrumb. If you want to be display all the labels, then you will have to remove those 2 green colored lines of code.
4. Save the Template
5. If you want to make the breadcrumb smaller then go to
Template Designer > Advanced > Add CSS and add the following CSS code there and Apply the changes
.breadcrumbs {
padding:5px 5px 5px 0px;
margin: 0px 0px 15px 0px;
font-size:95%;
line-height: 1.4em;
border-bottom:3px double #e6e4e3;
}
If you have any query / question about the tutorial, let us know by commenting below.