In January, I shared how you can add breadcrumbs navigation to your WordPress blog, I’m also a long-time Blogger user, so I thought it’d be great to share same tutorial for the Blogger users.
If you’re new to Blogger, it sounds impossible to have a breadcrumb navigation, but it’s really easy to add breadcrumbs to Blogger blog with few edits. Typical breadcrumbs look like this:
Home page > Category > Post
Navigate to your Dashboard > Template > Edit HTML. Search for the following code:
<b:include data='top' name='status-message'/>
If you found the above code two times, then make sure to do the same thing with the second one. Right before above code, post the following snippet:
<b:include data='posts' name='breadcrumb'/>
Now search for the following code:
<b:includable id='main' var='top'>
And post the following code just above:
<b:includable id='breadcrumb' var='posts'> <b:if cond='data:blog.homepageUrl == data:blog.url'> <b:else/> <b:if cond='data:blog.pageType == "item"'> <p class='breadcrumbs'> <span class='post-labels'> <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> <b:else/> »Unlabelled </b:if> » <span><data:post.title/></span> </b:loop> </span> </p> <b:else/> <b:if cond='data:blog.pageType == "archive"'> <p class='breadcrumbs'> <span class='post-labels'> <a expr:href='data:blog.homepageUrl'>Home</a> » Archives for <data:blog.pageName/> </span> </p> <b:else/> <b:if cond='data:blog.pageType == "index"'> <p class='breadcrumbs'> <span class='post-labels'> <b:if cond='data:blog.pageName == ""'> <a expr:href='data:blog.homepageUrl'>Home</a> » All posts <b:else/> <a expr:href='data:blog.homepageUrl'>Home</a> » Posts filed under <data:blog.pageName/> </b:if> </span> </p> </b:if> </b:if> </b:if> </b:if> </b:includable>
That’s it! Save the template and visit your blog posts to see the breadcrumb in action.
You can also style your breadcrumb by adding following CSS just above ]]>:
.breadcrumbs { padding:5px 5px 5px 0px; margin: 0px 0px 15px 0px; font-size:90%; line-height: 1.4em; border-bottom:3px double #e6e4e3; font-weight:bold; }
That’s it! Don’t forget to leave a comment or share this article if you found it useful.
not working. all the post body lost. please solve the problem :)
Maybe it’s not for your Blogger template. Revert all the steps and try another tutorial because they’re a lot of different ways of adding Breadcrumbs to Blogger.
its a not working for me..
it worked. Thank you :)
here is my blog: http://rommyarbantas.com
Thanks! It worked mighty fine for me. It’s very kind of you! I send you my regards and thanks!