Monday, July 23, 2007

I say every chance that I get, that Labels Rock. They are very user friendly, and produce attractive results. In general.

There's one feature of labels that not everybody finds attractive, however.
The gray box.

This mysterious gray box, aka the "Status Message", may contain distracting advice like "No posts were found which match your query" or "Showing posts with label". It will pop up unwanted, when you tweak your template - like making a static home page for the blog.

Fortunately, this is not hard to remove, though it may require several tries. Read the instructions, and decide for yourself which alternative may work better for you - then try one at a time. However you tweak your template, remember to clear cache, and restart the browser, after each try.

With the new Designer templates, that provide the "Add CSS" menu option, you simply need to add one CSS rule. Press "Enter", to create a blank line, before pasting the code!

.status-msg-wrap{
display: none !important;
}

The above tweak will remove everything in the status message. If you only want to remove the label message, specifically, you can use a conditional, as we conditionally display template objects.

(Note 1:): Some people have reported that, having removed the block of code denoted by "Try 1", that the entire block of code was replaced by the template editor. If you find this to be the case, repeat the process, deleting the block of code denoted by "Try 2".

(Note 2): It's possible that, with some templates (possibly newer ones), the code shown above, in an expanded widget, might be better removed while un expanded. In these cases, do not expand widget templates, simply look for and delete one line of code

48 comments:

I followed these instructions as per your reply to my post earlier on Blogger forums and it worked perfectly. Thanks again and I'll be checkin back here frequently as it's a very good blog. Thanks again.

I tried this before and it worked! But a made a new blogger blog and it doesn't work. I keep going to an error page. Another time I tried deleting the same section of code, that code kept coming back even after I deleted it and saved the template. Do you know what the problem might be?

One more question: If I want an image or some text to show up just on the page of posts with one label, how would I add that into the code?

(I have sections on my blog http://travispoling.blogspot.com/ denoted by labels. So when one clicks on a label, the top of that page will have the name of the section. But I only want it on that page.)

YAY did it! Chuck, I tried all the 'try 1' and 'try 2' and then to the next set of 'try 1' and another 'try 2' nothing worked! THEN FINALLY I tried out the last bit of info (the delete the so-so line with Expand/unexpanded wedget part at the bottom of your post) and that insufferable "No post matching your query" block is totally gone! Thank you, chuck. God bless you.

I now finally have my on "Home" page for my blog: Here is my blog, you may want to have a look at it:) : http://www.rocknock.co.cc/2010/05/birth-of-progressive-metal-watchtowers.html

PS: I simply removed the line in the EXPANDED Mode and the static block got removed. Thank you so much again.

I now finally have my on "Home" page for my blog: Here is my blog, you may want to have a look at it:) : http://www.rocknock.co.cc/2010/05/birth-of-progressive-metal-watchtowers.html

That's a kewl variation! You positioned the home page Welcome message gadget just below the header, instead of just above the posts. That makes the message spread across the entire blog, and above the sidebar. That makes it more visible. Nice job.

This worked perfectly, after five attempts using recommendations from other how-to's, yours is the only one that actually worked! No more "No Posts" box on the bottom of my page! Thanks!http://brandonpretz.blogspot.com

Fantastic! Using some random custom theme required me to use both methods. Had to message code from the HTML to undo the custom styling the the template was applying and then using the 'Add Custom CSS' bit to finally remove the messages completely. This helped me out a ton!