Sunday, May 27, 2012

How to : Remove "Showing posts with label.." message in Bloggger without deleting code

I read a lot of posts on -How to remove "Showing posts with label..." message that appears in blogger when a users clicks on a label. All of them however, ask you remove a section of the code that  appears in "Edit HTML" in blogger dashboard.

I, personally wouldn't want to delete code and replace them with other code for 2 reasons :
  1. It can easily mess up the existing code and spoil the template.
  2. If you want to revert back to the original , you will have to struggle to remember the old code as well as the structure.
Instead in this blog , we will see how we can comment out the section we don't need. We will be adding HTML comments around the text we don't need. Don't worry! Nothing very technical - anything that appears between <!-- and --> is a HTML comment. Thats it!!!

  1. This is the annoying text we want to remove..



  2. Go to Templates -->Edit HTML

  3. Click on Proceed
  4. Then click on the  Expand Widget Templates check box. Make sure its checked. Find the following code....
    <b:includable id='status-message'>
    
      <b:if cond='data:navMessage'>
    
       <div class='status-msg-wrap'>
    
         <div class='status-msg-body'>
    
          <data:navMessage/> 
    
        </div> 
    
        <div class='status-msg-border'>
    
          <div class='status-msg-bg'>
    
            <div class='status-msg-hidden'><data:navMessage/></div>
    
          </div>
    
        </div>
    
      </div>
    
      <div style='clear: both;'/>
    
      </b:if>
    
    </b:includable>
    
  5. Comment out the lines 5 to 23 by enclosing them within <!-- and --> as shown below.
    <b:includable id='status-message'>
    
      <b:if cond='data:navMessage'>
    
      <!-- <div class='status-msg-wrap'>
    
         <div class='status-msg-body'>
    
          <data:navMessage/> 
    
        </div> 
    
        <div class='status-msg-border'>
    
          <div class='status-msg-bg'>
    
            <div class='status-msg-hidden'><data:navMessage/></div>
    
          </div>
    
        </div>
    
      </div>-->
    
      <div style='clear: both;'/>
    
      </b:if>
    
    </b:includable>
    
  6. Done! Save Template and now check your blog by clicking on a label.

Hope you found it useful. Please comment! It will make my day!

3 comments:

  1. Awesome stuff. Thanks for the help.

    ReplyDelete
  2. Thanks a ton! It was really helpful.

    ReplyDelete
  3. This tutorial has additional feature but still I don't like this. It is really working method but it has a flaw that is it stops all other status messages from appearing too for example you also see a message on 404 page by default which can also be customized or on search query page. If you apply the above method, not only Labels message is gone but also other messages which is a loss to your blogging. Here you can find the correct method to remove showing posts with label which doesn't effect others.

    ReplyDelete