How To Filter Posts by Label on the Home Page (Create a Side-Blog

How To Filter Posts by Label on the Home Page (Create a Side-Blog)
Some of my favorite (non-Blogger) blogs display a "sideblog" in their layout in which to display news snippets and links to interesting sites. These sideblog entries (often called "asides" or "link blogs") are much shorter than a regular blog post, and do not appear in the regular posts section.While it would be simple to create a sideblog using a links list widget, Twitter, or byadding a Del.icio.us RSS feed to the sidebar, such methods would not allow readers to leave comments on our blogs about these entries. To allow commentary for sideblog entries, they need to be regular blog posts in a category whose posts are filtered from the front page.In this post, I'll explain how you can filter posts of a particular label from being displayed on your blog's homepage then use this label's feed to display your sideblog.
Step 1: Back-up your template!Before making any changes to your Blogger template, it is always good practice to make a back-up of your existing template. It is especially important for this Blogger hack: we will be filtering which posts display on the homepage, and any errors could result in no posts being displayed at all!To back up your Blogger template, go to Layout>Edit HTML in your Blogger dashboard, and click the "Download full template" link near the top of the page.You will then be prompted to save your template as a file to your computer hard drive which you could use to restore your template (if you make a mistake) or revert back if you change your mind about using this hack.
Step 2: Editing the posts loopFirst, go to Layout>Edit HTML in your Blogger dashboard, and ensure you have checked the "Expand widget templates" box.The code which we need to edit is located within the "Blog Posts" widget.Finding the correct section of your template to edit can be a little tricky, as there are several elements which at first glance appear to utilize similar code. Here is the section which we need to edit:




In your own template, this code may not contain the and tags, though this should not affect the overall functionality of this customization.If you struggle to locate this section of code, use your browser's search function to locate the following phrase: hfeed which should be present no matter which template you are using.When you have located this section of code (or similar), replace it with the following instead:




Be sure to highlight all of the code and replace with the section above in its' entirety! Otherwise, when you attempt to preview or save this code, you will receive errors saying that tags are not closed properly.In the code above, you will notice I have highlighted "Sideblog" in bold red. This is the name of the label which we will be filtering from the display of posts on the home page. You can change this to any label name you prefer. This is case sensitive, so be sure to use the same case in the code as the label you will use to tag your posts (ie: "Sideblog" is not the same as "sideblog").Once you have edited this section of code, attempt to preview your template. If any of your recent posts have already been tagged with the "Sideblog" label, you will now notice they are missing from the output of posts.Provided there are no errors visible when you preview your template, you can now save your edited template.
Step 3: Adding a feed widget to display your sideblogNow we have filtered "Sideblog" posts from the list of recent posts on the home page, we need to add a widget to display sideblog posts in the sidebar.To achieve this, we will use the sideblog label feed.All Blogger blogs which use labels produce a feed of posts from each label. The URL for label feeds appears like this:http://yourblog.blogspot.com/feeds/posts/default/-/LabelNameWhere "LabelName" is the name of the particular label you wish to use.This URL structure also works for custom domains. Simply replace "yourblog.blogspot.com" with the main URL for your blog.In this example, we will use "Sideblog" for the name of the label in the feed, which would look like this:http://yourblog.blogspot.com/feeds/posts/default/-/Sideblog
Using Feedburner to display sideblog posts
The simplest way to display your sideblog is to burn your label feed through Feedburner, and use the BuzzBoost widget code within an HTML/JavaScript widget.To do this, go to Feedburner.com and add the URL of your label feed. Then go to Publicize>BuzzBoost in the dashboard for this new feed.The code required to display your sideblog posts as HTML will be generated for you automatically which you can paste in an HTML/JavaScript widget in the Page Elements section of your blog. Alternatively, you could add this as a widget automatically using the widget installer option.
Using a regular Feed widget to display your sideblogIf you prefer not to use Feedburner, it is possible to display your sideblog using a regular feed widget. However, this will require more editing of your blog's HTML code (as Feed widgets will only display the post titles by default).Here is how to use a Feed widget to display post summaries for a sideblog in Blogger:
Go to Layout>edit HTML in your blog dashboard. Do not check the "Expand widget templates" box.
Find the following line of code (or similar) in your template:
Depending on your template, the code may not appear using the exact same phrases. If you are at all confused, search for a familiar widget title instead.
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl