Wednesday, January 11, 2012

How to perform a union label search on Blogger?

While Blogger allows you to easily search for all posts tagged with a specific label, there seems to be no way to search for a combination of a set of labels. This led me to coming up with my own solution which requires a bit more effort, but works!

The trick is that I name each label with the same prefix. In the case of this blog, I use tag:. Once each label has a prefix, I can use Google to search for articles with any set of labels. For example, if I wanted to search for all posts tagged with iPhone and Tip, I would enter the following terms into a Google search: "tag iPhone" "tag Tip". Had there not been a prefix, my query would have needed to be iPhone Tip, which would find many articles that only mention any of these words and aren't necessarily tagged with them. In fact, in the case of my blog, I have both words listed on the right side of each page, meaning that every single one of my posts would show up in the search results.

This brings me to my next point. I like the "Labels" sidebar gadget, but if I were to enable it, it would mess up my search results for the reason I just mentioned. In order to have a list of all my labels on the right side of each page and still have the union label search work, I needed to manually create the labels gadget. I chose to add an "HTML/JavaScript" gadget, and then created a really simple unordered list, linking to each of my labels (e.g. /search/label/tag:MyLabel). Unfortunately, this means that the list needs to be updated every time I create a new label.

The final tip I'll leave you with is that when you create a link to the Google search, I would recommend adding and inurl:html. The first part is obvious: it makes sure the results are on your own website. The second part ensures that the results will only include actual articles rather than pages which show snippets of articles (e.g. the home page or label search page).

You can see how all of this works by clicking on this link which will show you all my posts that are tagged with iPhone and Tip.


  1. Hi this idea sounds amazing is there a way to have a label search navigation bar with a drop down button on each Collum so you enter your labels on each drop down menu manually then the user can combine the labels on each drop down Collum and hit the search bar and only those labels contained in the drop down box that match each post will appear, this will be amazing, so any ideas or tips

  2. Just wanted to let you know, I was searching around on how to effectively search labels on blogger and came across your interesting post. It gave me ideas to find how to do what I needed. I posted my findings:

  3. Restore your PC to a prior time and you are finished. Doing as such will move back the progressions that brought on your Windows 7 PC to experience this blunder message. Click the Start catch and sort "restore" in the Start Search field. Hit the Enter key to proceed. In the event that incited, enter your administrator secret word and click Continue. C