How to Organize or filter recent posts of your blog by category/Label?
You do not need to be an HTML prodigy to separate posts on the homage or side bar according to category/label.
I always like the blogs or website that are magazine like and have separated their posts into different categories on the homepage instead of just showing all the recent posts in single category. In fact, it gives a very clean look to the homepage of your blog if you have several categories.
So, how to do it with minimum knowledge of HTML?
In fact, I have found 3 different methods that do the trick without touching the template code of Blogger.
So, even dummies are able to do this by just following the steps I am going to write down here.
METHOD 1: Through Feed Burner.
If you are blogging, I can safely assume that you are aware of RSS feeds and the role of feed burner.
You probable have burned your blog feed through feed burner but you may not be aware of the fact that you can have several feed for a single blog based on each label .For example, I have a feed account for my main blog but I also have feed account for each of my label e.g, “Browser” or “Blog/website Development”.
First step is to burn your feed for each specific label.
Go to Feedburner.com ad login to your account.
Create new feed by entering original atom feed address as http://yourblogaddress/feeds/posts/default/-/labelname
Replace “yourblogaddress” with your actual Blog address and “Labelname” with your label. If your label consist of more than one word, write %20 between them (%20 is equal to space).
After burning feed, skip towards feed management and go to Publicize option.
In Publicize window, go to Buzz boost and customize all the options as per your liking.
Copy the Script.
Go to you blog and add new HTML/Java Script gadget. Place the code into that gadget and you are done.
Feed burner will automatically show recent posts in that category.
Method 2: Using Yahoo Pipes
Enter your Blog address and label name for which you want to show recent posts.
Or alternatively I have written the yahoo pipes script here for your convenience .
<script src="http://l.yimg.com/a/i/us/pps/listbadge_1.4.js">{"pipe_id":"a12ea06cb64f2e32b3456cf426a0eec6","_btype":"list","pipe_params":{"urlinput1":"http:\/\/YOURBLOGADDRESS","textinput1":"WIDGETS","numberinput1":""}}</script>
Replace YOURBLOGADDRESS with your actual blog address. Replace WIDGET with your label name and paste this code into HTML/JavaScript widget.
Reposition the widget to any place where you want to show up recent posts for that specific category.
Method 3[Simplest]
This is by far the most favourite method for me and most simple for you.
Just copy the code below.
<!-- Recent Posts by Category Start --><script type="text/javascript">function recentpostslist(json) {document.write('<ul>');for (var i = 0; i < json.feed.entry.length; i++){for (var j = 0; j < json.feed.entry[i].link.length; j++) {if (json.feed.entry[i].link[j].rel == 'alternate') {break;}}var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bsvar entryTitle = json.feed.entry[i].title.$t;var item = "<li>" + "<a href="+ entryUrl + '" target="_blank">' + entryTitle + "</a> </li>";document.write(item);}document.write('</ul>');}</script><script src="YOUR-BLOG-URL/feeds/posts/summary/-/LABEL?max-results=ADDNUMBER&alt=json-in-script&callback=recentpostslist"></script><span style="font-size: 60%; float:right;"><a href="http://www.irnovo.com"><i>i</i></a></span><!-- Recent Posts by Category End -->
Now replace YOUR-BLOG-URL with your website or blog URL and replace LABEL with the name of the label for which you want to show recent posts and replace ADDNUMBER with any numnber like 5.
Add HTML/Javascript widget in blogger template and paste this code in that widget. it automatically pull recent posts in in that specific category.
You can repeat the same mehtod for next label also by adding one more widget.
If you have any problem in implementing this method to your blog, please mention in the comments and I’ll follow you ASAP.




3 Responses:
Thanks for improving me my blog and my post
http://naukri2all.com/
i m facing problem by html code
grt post ---
Post a Comment