Filtering Posts By Label And Put It On Sidebar


Valid until 31 January 2015 (unless noted)
Filtering posts by label and show it on your blog sidebar - this trick is very useful to create an effective and efficient navigation especially if you have blog with different topics (labels). It lets your visitor to access your interesting articles under labels easily. Filtering post by label is also good for your blog to retain your visitors to read more article (time visit), thus it will increase your blog's page impression.

Filter Post title by label on sidebar

This trick is using recent post JavaScript and blog feed to show and filter the posts.
Steps :

1. Log in to Blogger account
2. Go to Layout - Page Elements
3. Add a Gadget - Choose HTML/JavaScript
4. Copy and Paste this code :
<script src="http://sites.google.com/site/angga123site/recent-post.txt"></script>
<script>var numposts = 100; var showpostdate = false; var showpostsummary = false; var numchars = 100; </script>
<script src="http://YourBlogURL.com/feeds/posts/default/-/Your%20Label?orderby=published&amp;alt=json-in-script&amp;callback=rp">
</script>

Change http://YourBlogURL.com with your blog URL

Change Your%20Label with label you want to show.
For example here, the label is "Your Label", you have to change it with "Your%20Label". (an additional %20 is "space" between words).
Note : Labels are case sensitive!

To change the number of posts, change 100 to any number you like

5. Click "Save" - View your blog!

To make it more simple and save some space on your blog you can put the "filtering posts by label" on your tab view navigation widget.

4 comments:

jinkurakura belajar gitar said...

very very cleaver... smart idea brother ;)

Stefen said...

this error keep on show whenever I click save it
bX-u01hr1

:((

Stefen said...

I can use it now...just ignore the previous comment... ^^

Thx...

Taufik Lukman said...

It works! thanks :)

Post a Comment

Rules:
Comment must be in English, otherwise will be not listed.
Spam comment will be deleted, so don't waste your time for it.
Respect yourself, respect others.