Thursday 18th January, 2007

Blogger Hack - Limit Label List

Today I brought one of my blogs (not this one) over to the new version of blogger and rather than have it list over 30 labels (AKA tags or categories) in my sidebar, I developed a hack to show only those with more than a given number of corresponding posts. It's quite simple and involves adding just two lines of code.

For those it may concern, here is what you need to do:

---

1. Make sure you're using the new version of blogger, have added the labels element to your template and have at least a few posts with labels.

2. Go into "Edit HTML" under the template tag (If you can't find the code you shouldn't be messing with it.)

3. Check "Expand Widget Templates".

4. Locate the "Labels widget" in that long list of badly laid out code - it starts a bit like this:

5. Surround the subsequent list tags with a conditional statement that filters out any categories with post totals that don't exceed a specified number, in this case 4.

6. Knock up a list of links for all your labels, bung it on the Internet somewhere and include a link to it just below your shortened label list called something intuitive like "See all" or "More"

See example.

---

Whilst this is no doubt boring for most of my readers, the Internet is all about sharing so hopefully on or two people will stumble across this and find it useful.

4 up, 0 down

4 Comments

Thanks, I used it!

Posted by Abbi on Monday 12th November, 2007 at 11:44

very usefull ! thanks...

Posted by Abbi on Wednesday 14th November, 2007 at 23:02

Really helpful, thank you

Posted by Abbi on Saturday 29th March, 2008 at 01:08

thanks! been trying to do this forever!

Posted by Abbi on Thursday 19th June, 2008 at 01:36

Add a comment


HTML tags allowed: <i>, <b> and <a href...
Our naughty word filter will be applied to 12 common swear words.
Your name: (You are not logged in)
Write 6 as a word:

Recommended Book

Straight Out of University

Tom Shock
Tom Shock

0 captions

Archive

2005
May (26)
June (10)
July (13)
August (17)
September (12)
October (8)
November (6)
December (16)

2006
January (11)
February (9)
March (6)
April (10)
May (11)
June (1)
July (7)
August (8)
September (3)
October (5)
November (1)
December (4)

2007
January (3)
February (2)
March (4)
April (5)
May (1)
June (7)
July (7)
August (8)
September (9)
October (1)
November (3)
December (6)

2008
January (2)
February (5)
March (5)
April (10)
May (8)
June (8)
July (12)
August (9)
September (8)
October (4)
November (1)
December (4)

2009
January (7)
February (5)
March (9)
April (5)
May (4)
June (5)
July (3)
August (1)
September (1)
October (1)
December (1)

2010
January (1)
February (12)
March (12)
April (4)
May (1)
June (3)
July (2)
August (7)
September (5)
October (4)
November (7)
December (5)

2011
January (6)
February (2)
March (2)
April (4)
May (2)
June (1)
July (2)
August (2)
September (2)
November (2)

2012
January (4)

James
James

1 caption
Updated 6 weeks ago

Recent queries

Visitors searched the web for:

caption of broom
interchangeable spineless people
byrchall leapoardess
rubbish presentation
scrapbook caption
landlady helps me crossdress & uk
just sha blog's
sha crawford arf arf
sha nurr blog
genetically engineered jellyfish monkeys
most disgusting
[...]
daily mail front page generator
the sun captions
sha 5 generator
deadliest sea creachers ever
helen is an arf monkey
gruesome murders bodies
sha
scared? you should be, he's a dentist
twister thong
hazards of genetically engineered children
amazing park bench
husband anniversary nude blogger
jellyfish sting is disgusting
poisonous sea creatures
kate's belly
katy k phallic freud
sha alternatives
snake up the nose
primark lingerie
wenger poison west ham spurs
pieing
sitting on a park bench looking at watch
spiderman sex
scared? you should be, she's sha crawford!
cornish birds
landlady made me crossdress

Sheep
Sheep

0 captions
Mark and fire
Mark and fire

0 captions
Zach
Zach

3 captions
Snowman Ed
Snowman Ed

0 captions