Thursday, October 11, 2007

Tip #1: Use Labels to showcase only your latest post per category

The principle behind this tip applies to all types of blogging services, but the syntax given here will be for Blogger blogger.

Since we moved to the new version of Blogger, Labels were added. Labels, also known as tags, are a great way to organize (or at least mark) your content and make it easier for people to find what interests them.

The problem
A number of bloggers have weekly or monthly features, for example "Tuesday Tips" or "Monday Gossip" or "the week in review", or "favorite things on tv this week", etc, that they tag appropriately with the label. The problem with clicking on the label is that it loads and shows a number of posts. So if your blog has been around for a while, the reader will be loading stuff they already read.

The solution
The solution is using Labels to create HTML links that limit the number of results you get from a Label. For example, you want your readers to only read this week's tv listings, since the previous week's are gone already. So you create a link at the top of your blog that says "This week's TV listings" or "This week's review" or "This week's Gossip". Sure, you can do this manually by editing the HTML every week. But why do it manually when you can have Labels and HTML do it for you automatically every time?

The trick is to append max-results to the Label. The syntax is ?max-results=1, where 1 is the any number, eg pick one if you only want the latest item to be displayed.

How to do it?
0. You need a basic understanding of creating an HTML link to do this.
1. Open a browser window and visit your blog, for this example, let's say this one.
2. Locate the Labels and find the label of your choice. Let's say "blogger" in our case.
3. Move the mouse over the "Blogger" tag and "Copy Link Location" (or "Copy Link Address" or "Copy Shortcut") depending on what browser your are using. You are basically copying the link.
4. This will result in the link being copied to your cut/paste buffer:
5. Go to the desired location in your Blog Post or Blog Template and create a standard HTML link.
6. Paste what we copied in #3 in between the quotes after href. This will result in this: My Blogger Columns. As it is now, it will show all entries you have on the label blogger.
7. And here comes the magic, we append the max-results=1 to the Label link, producing this: What you add is shown in BOLD. Be sure not to forget the question mark because it is part of the correct syntax. The resulting link will look like this: My Latest Blogger Column
8. If you want to showcase your last two posts on the topic, change the number to 2, if you want to show your last 3, change it to three.

No comments:

Recent posts