Adding Link Tree / Breadcrumb Navigation Above Blog Posts

Just to increase pageviews, a blog must be designed in such a way to keep visitors busy, letting them explore parts of your site that might remain undiscovered without a design based on easy navigation. Just like the related post widget and numbered page navigation, adding breadcrumb navigation ( also called link tree) is just another way to keep your visitors engaged and stay longer on your blog. In case you don’t know what link tree means, it’s those links that shows where you are in a site and in blogger, it trails from the homepage down to label page and lastly, the post page you’re presently viewing. You can see it right at the top of this blog post and if you can’t, below is the screenshot of just how it should look.


To add this to your blog, follow these simpple steps:

1. Log in to your blogger account and click on Design ( hey, I’m still using the old interface )

2. Click on Edit HTML and check Expand Widget Template box

3. Press CTRL and F on your keyboard and search for this code:

<b:include data='top' name='status-message'/>

4. Right below that, paste this:

<b:include data='posts' name='breadcrumb'/>

There may be two occurrences of <b:include data='top' name='status-message'> in your template, you should do the same thing if there’s a second one.

5. Now search for this code:

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

6. Just above it, paste this code:

<b:includable id='breadcrumb' var='posts'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<!– No breadcrumb on home page –>
<b:else/>
<b:if cond='data:blog.pageType == "item"'>
<!– breadcrumb for the post page –>
<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"'>
<!– breadcrumb for the label archive page and search pages.. –>
<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>

7. Now here comes the last part where you have to apply some skinning to the link tree. You can use the default one below or change it if you know a bit of css.

Search for this code:

]]></b:skin>

In the line immediately above it, paste this:

.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;
}

Now save your template, view a blog post and you should see the breadcrumb navigation links right above your blog posts.

Further Explanation

On step 6, you need to do some editing if you’re using numbered page navigation. It’s not important though but I guess you might not want to see that label page get rather too long with up to 20 posts showing up. I repeat, this is only useful if you’ve done the numbered page navigation tweak.

Simply change 'data:label.url' to 'data:label.url + "?&amp;max-results=5"'

You should change 5 to the number of posts you set to display on a page.

avatar
Don Caprio is a full time blogger / web designer living in Nigeria and apart from blogging, my other obsession is music. I'm a self-confessed Tupac fan, an iOS lover, an Android user, a Windows 8 power user, a writer with a 5-year old unfinished novel... and the list goes on and on. You can add me on Facebook, follow my updates on Twitter or add me to your circles on ! You can as well grab my feed and get updates through email.
avatar

@doncaprio

Tech blogger at http://doncaprio.com Web designer at http://doncaprio.org
5 Best Antivirus Software For Windows 8 In Year 2013 http://t.co/dCSPom4v7l - 13 hours ago
avatar
avatar

Get free daily updates through email

Comments

  1. Yes boss, just like coding wapka, but seriously where do you learn this stuffs from?

  2. Thank you for sharing..

  3. Two of your suggested modifications to Blogger say to put the code in front of: ]]>

    I only have this: ]]>

    (on two lines as above)

    is this the same thing? I can’t find exactly what you describe.

    Also, if one wants two of your modifications and both say to put the code directly in front of the same line of code – can you do both and does it matter which order they are placed?

    Thanks!!

  4. Oh wow. So that didn’t work. The code that I copied and pasted did not show up. Great.

    Well let me try this; your code is ]]> (without the breaks)

    Mine is ]]>
    (without the breaks)

    Let’s see if that worked.

  5. Nope. *sigh*

    Ok… let me try this; mine has “template-” between : and skin.

    • Have you been able to add the first two previous codes? First save your template with the two previously added codes. The last part you’re now trying to add is the styling part and the breadcrumb links may even appear without it.

  6. I was trying to add Link Tree / Breadcrumb Navigation Above my Blog Posts but I couldn't find "<b:include data=’top’ name=’status-message’/>" & "<b:includable id=’main’ var=’top’>" in the Edit HTML. What can I do again. Thanks

  7. this is great and useful

  8. hello!

    thanks for the code
    but i have a problem because i usen’t the same variables
    can you help for adding this code to my site http://www.sc-ing.com/
    please.
    MNR recently posted..Introduction sur la thermographie infrarougeMy Profile

  9. Can you tell me how to put it below the post title? I like this widget!
    Aditya Sam recently posted..Identifying My Sources of Stress and Dealing With ThemMy Profile

  10. Im getting This error
    Error parsing XML, line 1830, column 3: The content of elements must consist of well-formed character data or markup.
    Derek recently posted..Microsoft Office Goes Symbian!My Profile

  11. No doubt the bread crumbs navigation will help to increase the page views and one will have lesser bounce rate.
    Nse recently posted..NSE Share Tips – 100% Return with Free Stock Tips : 18 MayMy Profile

  12. Bro U still didn’t reply me
    Derek recently posted..LiveScore Lite 2.20: View Live Football Scores On Your PhoneMy Profile

  13. i’m kinda still expecting a reply bro
    Derek recently posted..LiveScore Lite 2.20: View Live Football Scores On Your PhoneMy Profile

  14. It does works. Thank you, Don! It is amazingly easy to implement.

Speak Your Mind

*

CommentLuv badge