Playing Hide and Seek with Label Counts

Recently you learned how easy it is to reduce clutter by hiding blogger archive and label counts. What you didn’t know is how easy it is for them to reappear — like all clutter! Using that previous post I hid both types of counts. Since the labels list was so long, yesterday I put them in a drop-down menu. There’s a great explanation in the Blogging Tips post for this trick that frees up a lot of sidebar space. But soon after, I noticed the dreaded label counts peeking out again!

Finding the Usual Suspects
As a web or software developer you learn to suspect the most recent change, which was the lovely drop-down menu. Looking closely at the replacement code in the tip I realized the line for label post counts, (<data:label.count/>), was added back in. As I mentioned before, many tutorials assume you’re made no template changes in the same area or that you have a photographic memory! This may be another reason to follow my advice of putting in comment lines for template changes.

Fixing the Problem
The solution seemed simple, just go back into the template and delete that line. The blogging tip for the drop-down menu had stated “this time, do not check the “expand widget templates box!” You find the line and replace the entire widget with the tutorial code (apparently a shortcut for those with more advanced skills than you or I have). That worked fine, but what I didn’t know was that you must check expand to find the replacement code the next day. I eventually found the line, changed it and then got a Blogger error trying to preview! Something was very wrong. Even previewing without any changes no longer worked.

I circumvented the problem by redoing the drop-down menu instructions, leaving out the counts line (no expanded widgets). I left a ‘help’ comment on the tutorial blog and reported the error to Blogger. I seemed like until it’s fixed you can not make changes in expand mode. The help forums advise that this type of problem can go away on its own after a couple of days or if you clear browser cache/cookies. The problem cleared up in a few hours, not sure why. So all is well.
This moral of this tale is you must be careful when you pick up each template tip, especially if you’ve done something with that element before. When someone suggests a wholesale replacement of a section, be sure to save the original code in a note to yourself. Otherwise, you can not reverse the tweak! So this is another pitfall, but it should not stop your from customizing your blog with simple tweaks.

Be sure to sign up by RSS or leave your email address — don’t miss upcoming tips!
References: [photo by Aftab] Other quick tips and life hacks:
Getting Out of the iGoogle Sandbox
Screenshots of Your Design with Google’s Chrome Browser

If you found this post useful, leave a comment and share your thoughts with others.
Get future posts in your RSS feed or by email.