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, because posts 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 hyperlink
First 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 URL
A 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://www.bloggersentral.com/search/label/SEO%20and%20traffic
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!
98 comments to "Adding label (category) tabs to navigation bar"
hi green lava.
me again:. u can speak malay, so let's talk in malay:) hehe. kenapa failed eh ? i salah applied maybe. but its quite complicated for me. if u still remember i'm the one who asked u how to add post under certain page..then u suggested to me to following this one.but i'm not sure this is the answer for may last question. what i want is.. i want to add my daily post or entry under one page (eg: healthy tips page)..i totally stuck how to add it eventhou i had read your last tips for many times ^^
@AkuDeqja
I left a comment on your blog...in Malay :)
akudeqja, let's talk malay but u talk english ma haha. err...
http://subscribeoptioninimageformat.blogspot.com/2011/02/how-to-create-subscribe-option-in-image.html
u can copy and publish the content in your blog from the link i have given to you...many people will be benefitted..
@Khairi
tu la pasal :)
thanks a lot..
I am a little lost. As I understand correctly, after getting label URL, I simply add that URL into a page or tab as you call it?
@G
Yes you add it to a tab.
Hi, nevermind I have figured it out.
Thanks for this great tip.
The first visit here. thanks for sharing
@SEO FRIENDLY
Welcome to Blogger Sentral :)
Check out the archive in the sidebar.
can't seem to figure out step three, nothing happens my post stay on my home page instead of going to the specific drop down menu. can you help me figure this out
thanks
@Melinda
An example:
Your label URL for the label Easter is http://mommymomentsabc123.blogspot.com/search/label/Easter
Now go to the HTML code for "Easter" menu:
[li][a href="http://mommymomentsabc123.blogspot.com"]Easter[/a][/li]
and replace the target link http://mommymomentsabc123.blogspot.com with the label URL
so the end result will look like this:
[li][a href="http://mommymomentsabc123.blogspot.com/search/label/Easter"]Easter[/a][/li]
Hi there, I followed as stated in this post but it says :
LHS of numeric is null before 49 in http://8thcanvas.blogspot.com/search/label/Health
why?
This is how it looks in my template (HTML script):
[!-- begin top menu --]
[div id='topMenu']
[div id='topMenu_content']
[div id='topLinks']
[ul]
[li class='current_page_item'][a expr:href='data:blog.homepageUrl' title='Home']Home[/a][/li]
[li][a expr:href='data:blog.homepageUrl + "feeds/posts/default"' title='Posts RSS']Posts RSS[/a][/li]
[li][a expr:href='data:blog.homepageUrl + "feeds/comments/default"' title='Comments RSS']Comments RSS[/a][/li]
[li][a href='#' title='Edit this link']Edit[/a][/li]
[/ul]
[/div]
[/div]
[/div]
[!-- end top menu --]
[/div]
[!-- end header --]
@Sheena
Just use a normal list syntax, like in this example:
[li][a href="http://8thcanvas.blogspot.com/search/label/Health"]Health[/a][/li]
you don't need the "expr" thing, except for the Home tab (leave it as it is).
Its not working :( I dont know it is not linking it..and it brings to other page without my template theme..I dont know where iam doing it wrong~
@Sheena
1. Labels are case sensitive, for example the correct URL for "science" is
http://8thcanvas.blogspot.com/search/label/science
instead of
http://8thcanvas.blogspot.com/search/label/Science
2. The "About" tab.
You have to create the page first in Posting > Edit Pages > New Page.
Then copy the page's URL and use it in the tab.
Hi there, Thanks for your prompt reply and informative feedback on the issue. It was VERY helpful:D Thank you.
You're my blog guru!!
how can I change the name at the tab that comes together with the layout?There are Home,FAQ,Contact and About.How can I change them?
@Q*
I'm afraid you can't. The tabs are actually a part of the header image. You are kind of stuck with them :(
I suggest you change your template.
You can try Free Designer Blogger template: Tinted Panes
After looking everywhere on the internet this tutorial was the only one that worked for me. Thanks so much and keep up the great tutorials!
Have looked elsewhere unsuccessfully but with your tut was actually able to get my pages/pagelists working just fine, thanks!
One quick query... I've centre aligned the pages and padded them to stretch them accross the entire header but the pagelists displaying posts with a certain label won't work with the padding CSS I've used, and just stay squished up close to one another. Any ideas?
@Beth-C
Have you tried this? How to align Pages/PageList gadget
Just a quick question. How do you add multiple labels to one tab? Do you simply seperate with a comma when listing labels or does it require more than that?
@Anonymous
You can't use multiple labels.
But here's what you can do - create a label on top of those labels. For example if you want to show "apple" and "orange" labels, simply add a label "fruits" to both of them and use it in your label URL.
Thanks! I searched all morning for something like this, and was very unsuccessful. This worked perfectly since I wanted some label tabs next to some static pages. Thanks a million.
www.brooklynexperiment.com
Hi - Thank you for the great information. I copied your code and have a navigation bar with links: http://www.knowfoodnow.com.
I would really like the posts to show up as snippets per your link below. Would you be kind enough to explain how you did that. I am getting full text for each post.
http://www.bloggersentral.com/search/label/SEO%20and%20traffic
Hello again,
I have one more question pertaining to the navigation links. Now that they are working, my google search bar seems to be affected. It is pulling up to many articles that have nothing to do with the search word. Is there a way to fix this?
Thank you.
@Marsha Hallet
This post will teach you how to show only post titles on archive and label pages.
As for adding the snippets, I've answered it in the comments (of that post).
Thank you for responding so quickly! This is working out very well except I see:
"Showing newest posts with label XXXXX. Show older posts"
"And I would like to see Showing posts with label XXXXX: Show all posts" per your example.
The problem is that when you click on show older posts it says there are none which is confusing.
Please tell me where and how I modify that text.
@Marsha Hallet
The text is automatically generated by Blogger and I'm afraid it's beyond our reach.
@Shirshak Bajgain
You can't. You are stuck with the later permalink structure.
it is not very good discus
Hi G, awesome blog & thanks for all the effort done :D
I have a small question about labels :
let say am currently viewing a specific label tab [ ex: music] then I clicked to view a post from this label ,,,, How can i make the navigation at bottom [ next post / previous post ] to go to next/previous post from label music only ,,,
the standard thing that next/previous post will navigate based on date of post !
any ideas ??
many thanks in advance
@Ehab
I don't think that's possible :(
thanks great tutorial.. finally i can configure my site to look more professional
HI, I have been searching for this forever!!!
Here is my question... I see that I can add this to a tab in a navigation bar and point to the URL I want. Great! Fab!
BUT what I am hoping for is to....
have my tab in a Nav BAR
Drop Down Menu
The items in the drop down menu are pages.....
I want the link to the page to take me directly to the search URL, without having to go to the page and then click on a separate link.
Is that possible? Does this make sense?
I am using a self-hosted wordpress.
Thanks! You rock!
Jodi
ps..my site is under construction so you can't see it.
@Jodi
Sorry, this tutorial is for Blogger blogs.
That said, adding a dropdown menu in Wordpress 3+ is easy. Go to Dashboard > Appearance > Menus to create your menu. Add tabs to the menu by ticking the categories, custom links etc. and click the Add to Menu button. You can turn a tab into a subtab by dragging it into another tab.
To display the dropdown menu on your blog, go to Dashboard > Appearance > Widgets, scroll down to Inactive Widgets header and locate the "Navigation menu" widget. Drag it to your preferred location.
yes this is it what i am looking for quite somedays
sorry kalu nk tnya..
sy da try, tp kan jd mcm ke bawah..
boley buat jd mcm pages x?
siap ade kotak2 yg boley separate kan label tu?
tq2
@Kedai Kelat Kelip
Awak guna Blogger template lama (Layout template) sebab tu tiada kotak2. Kalau guna Designer template, tabs tu akan berkotak2 secara otomatik.
Pilihan terbaik ialah tukar ke Designer template. Lagipun Designer template senang nak customize.
sangat membantu
thank you
check my site
UR THE BEST!IMMLOOKING FOR IT MANY DAYS!TNX A LOT!
Thanks for this wonderful info. Works Fine!
This is great mehn,
i love this. It's too loaded and i'm gotta implement it right away!
Tumb up!
Best help I have found Thank you so much
Thank you!!!!
thank you very much very great article helped me alot ... i was searching it for a long long time and your %20 made it all a big thanks for you ...
Hi
I am so much thankful for your help for each and every time I visit this site, always get useful information about blogger, I have learned a lot about customizing blogger blog form this site.
Regards
hi... nk tny... saye nk add pages...tp xleh... katenye alrealy added...
tp kat pages saye xde pon..kat page elements pun xde add pages tu... mcmane ye?? arap kawan dpt membantu...
@suriatimustafa
Nampaknya awak dah dapat selesaikan problem tu sendiri, menggunakan LinkList :)
good job!
Wow. Just what I was searching. You are a genius, Greenlava. thanx a lot.
thanks
I have a few questions and hoping someone can help me out as I have been searching for some answers and can't seem to find them on the net. I'm new to blogging and so far I've enjoyed the learning process on designing my blog. However, I have reached a couple of problems.
(a) I and am trying to figure out why my drop down navigation menu bar does not contain any of the labels from my posts. Only two of the eight tabs show the labels that are labeled under the heading, the rest remain on the home page.
(b) Then when I click on the "home" page navigation bar I return to a page that is empty. Does this mean that I have to put "home" as one of the labels.
(c) would it be better to rid my blog from the drop down menu created by following Blogger Sentral sets and use a linklist gadget instead? I really like the drop down menu look as I see myself adding more menu tabs in the future.
Many thanks in advance for the help.
This is what my HTML code looks like
[ul id="jsddm"]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Home"]Home[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Workout"]Workout[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Nutrition"]Nutrition[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Lifestyle"]Lifestyle[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Pregnancy"]Pregnancy[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Thins no one tells you"]Things no one tells you[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Reviews"]Reviews[/a]
[ul]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/Reviews/Baby stuff"]Baby stuff[/a][/li]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/Reviews/Momma stuff"]Momma stuff[/a][/li]
[/ul]
[/li]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Budget living"]Budget living[/a]
[/li]
[/li][/li][/li][/li][/li][/li][/ul]
I finally found what I was looking for! Thank you Blogger Sentral.
@Jesseny
Things you need to know regarding Blogger labels:
1. Labels are case sensistive.
2. Labels are one level only. For example the URL you are using:
http://mommaalwayssaid2.blogspot.com/search/Reviews/Baby stuff
is nonexistent. The correct URL is:
http://mommaalwayssaid2.blogspot.com/search/label/baby stuff
And one more thing, Home button is usually for your homepage.
Here's the corrected code:
[ul id="jsddm"]
[li][a href="http://mommaalwayssaid2.blogspot.com/"]Home[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/workout"]Workout[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Nutrition"]Nutrition[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/lifestyle"]Lifestyle[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/pregnancy"]Pregnancy[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Thins no one tells you"]Things no one tells you[/a]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/Reviews"]Reviews[/a]
[ul]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/baby stuff"]Baby stuff[/a][/li]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/momma stuff"]Momma stuff[/a][/li]
[/ul]
[/li]
[li][a href="http://mommaalwayssaid2.blogspot.com/search/label/budget living"]Budget living[/a]
[/li]
[/li][/li][/li][/li][/li][/li][/ul]
more on no.2 above -to mimic subcategories/sublabels? ("Baby stuff" and "Momma stuff" ) for "Reviews" tab, you need to apply "reviews" label to each posts labeled "baby stuff" and posts labeled "momma stuff".
Thank you so much for this tutorial! I've been searching about eight hours today for the answer for this question. So glad I found your blog. Very easy to understand and much appreciated. :)
Hey I just wanted to say that I really enjoyed reading your blog. You have good views, Keep up the good informative info. thnks
Nice One!
So helpful!!! Thank you so much for taking the time to write up this post!!!
very helpful for bloggers
thanks.it answered my query.:)
i like it thank yu for posting
It is a very informative article.I got very good information about how i can add a tab in blogger.
visit here again. good sharing.
Thank you Man... very simple to understand. This is what I need and I got it once again thank you.
Thank you! This was very helpful!
Thank you admin. I waill us ethis for my blog.
great job..... Thanks for this tip
Even though I added the label in my post, it doesn't appear at the page when i click on my tab. Help please?
@Anonymous
Make sure the tab's URL is correct.
thankyou suhu. this post very hepful for me.
Thanks so much, at last some clear and simple to understand advice for technophobes like me.
Thank you very much!
Thank you, so much ....!!!!
Thanks,I have been looking for it....
I have been searching for a solution for days. Thank you for the simply put and helpful info! Just organized my entire blog in less than 15 minutes!
WoW!!!! Thank you so much for this blog changing post!!!
This worked so well! Thank you!!!
I add it to my blog
http://cricscope.blogspot.com/
after click the tab that blog disply
"showing posts with label videos"
then display posts
I want to remove displying this "showing posts with label videos"
how can I do it
@cricview
Go to Template > Customize > Advanced > Add CSS and add this code:
.status-msg-wrap {display: none;}
So I added the page using the pages gadget and it works but when you click on the page it shows at the top "Showing posts with label food. Show all posts" for my Food page for example. Is there a way to get rid of this?
@KarennnTran
I've answered similar question here.
Awesome post Greenlava .... Keep sharing the information with us .... thanks a lot
This tutorial of sorts is very crucial to bloggers who are not aware of the method that goes into adding label tabs to navigation bar.
finally! it workswithmy blog..
Thanks Alot Dear Its work
thnx alot for posting this wonderful blog
it really solved my problem
thnx a ton
Thanksssssssssss!!!!!!!!!! ♥
THANK YOU. NICE TUTORIAL :)
Thank you for explaining how to add categories for my blog :o)
Thank you so much! Exactly what i've been looking for!
Your the BEST ! +rep
You, sir, are AWESOME!!! This was just what I needed and it was so clear and easy to follow. Thank you! Thank you! Thank you! (:
xx, E
curiositydidntkillthiscat.blogspot.com
Comments on this post are closed.