Adding label (category) tabs to navigation bar
How do you add a tab (on horizontal navigation bar) that shows all the posts that fall under a subject or category in Blogger?
Before I give a correct answer, let’s first see a popular-but-wrong DIY method (using Music category as an example):
- Create a page with “Music” as the title. “Music” tab will be added to the bar automatically. So far so good.
- Attempt to add music posts to the page. This is where it gets stuck, becauseposts can’t be added to pages.
- Mission failed.
Well, that’s the end of that.
The correct way of doing this is by adding a tab linking to a label-search URL. A label-search URL is a link that points to a label-search page. This page lists out all posts labeled with a particular label.
Here are the steps:
1. Label your posts
Label your posts according to subjects or categories (if you haven’t already done so). This is pretty basic, but if you don’t have the slightest idea what a label is or don’t know how to apply it, read How do I label my posts?.
You can also apply a label to multiple posts at once.
2. Get the label-search URL
You can get the URL of a label-search page in a couple of ways -by copying the label’s hyperlink or construct the link yourself.
- Copying label’s hyperlinkFirst view your blog and find the label. Labels are hyperlinked and are usually displayed at the bottom of each post and in Labels gadget if you have a Labels gadget installed. You can get the label URL by right-clicking on the label and copy the link from the context menu: In Firefox you select “Copy Link Location”, in Chrome select “Copy link address”, and if you are using Internet Explorer, select “Properties” and copy the link from there.
- Constructing label-search URLA URL follows the format below:
http://YOURBLOGNAME.blogspot.com/search/label/YOURLABEL
For a multiple word label such as "YOUR LABEL", you need to replace the space between words with %20, like so:YOUR%20LABEL
. Labels are case sensitive, make sure you enter the correct letter case.Example:
This is the URL for BloggerSentral’s “SEO and traffic” label. Clicking it will take you to a page showing all posts that fall under that label:
http://4carepc.blogspot.in//search/label/windows%20and%20camera
3. Add the tab with the label URL
The method of adding the tab is different depending on the type of widget used for the horizontal navigation bar.
- To add the tab to the Pages gadget, follow this tutorial: Adding non-page links to Pages/PageList gadget.
- If your tabs uses a LinkList gadget, enter the URL into “New Site URL” text box.
- For tabs that are made of list items or anchor tags, just add the label URL as a target link like so:
<
a
href
=
"PUT LABEL URL HERE"
>Link Text</
a
>
Enjoy!
No comments :