Making a gadget visible only to the blog administrator

And the post title says it all. There are gadgets that sometimes we want to be visible only to us and not to our blog readers, perhaps a Survey already ended that we want to keep, a counter, or any gadget that while we customize, we don't want anyone else to see until the final result is ready.
blogger widgets, blogger tutorials
 The procedure is simple, we just have to add two lines to our gadget that we want to hide.

First thing to do is to go to Template > Edit HTML and then search for the gadget's code we want to hide. It will be easier using the CTRL + F keys and locating the name of the gadget/widget.

For example, in a HTML/Javascript gadget, we will see a code like this:
<b:widget id='HTML1' locked='false' title='' type='HTML'>
<b:includable id='main'>
<span class='item-control blog-admin'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</span>
</b:includable>
</b:widget>
All you have to do is add the parts in red and ready. If you close the session go to your blog you'll not be able to view the gadget that you have hidden, but as soon as you sign in you will see that it is visible to you.
Not all gadgets have the same structure like in my example, but it will be easier to guide you, just place the first code in red just after <b:includable id='main'>

And the second red code just before </b:includable>
Note: to look inside the widget's code, click on the sideways arrow next to the widget's id.

And with that the gadget will be hidden for readers except you.

6 comments:

  1. There are ways to hide gadget or widget to your blog but this trick is special because you see it privately or exclusively but not to your users
    This is a nice post bro!
    Thanks!

    ReplyDelete
  2. NICE POST. PLEASE CHECK YOUR CONTACT PAGE, IT'S SHOWING ERROR 509. I WAS TRYING TO CONTACT YOU PRIVATELY BUT TO NO AVAIL. PLEASE WORK ON THAT AND INFORM ME WHEN THE ERROR HAS BEEN CORRECTED OR BETTER STILL, YOU CAN SEND ME AN EMAIL @ adigunsherif@gmail.com

    ReplyDelete
  3. Great post. I bookmark your post.Thanx for sharing with us :)

    ReplyDelete
  4. I cant see my google adsense widget on my blogger admin layout. can see only on blog page. it's very hard to edit. how can i get back my google adsense widget visible on blgger admin layout editing page? thank you.

    ReplyDelete
  5. thanks for this useful tricks =) http://blognisher.blogspot.com

    ReplyDelete
  6. Although this trick does hide the widget from non-admin users, the hidden elements are still sitting in DOM, so it can be easily grabbed from the page source.

    ReplyDelete

Although every comment is appreciated, due to an overwhelming amount of questions, I can no longer provide personalized help. Keep in mind that comments are moderated and may take some time to appear. All spam comments will be deleted. Thanks for understanding!