Saturday, 21 September 2013

[Exclusive] Gadget Visible to Blog Administrator ONLY



There are some gadgets that we don't want to show publicly, 
For example
I do not want to show my site COUNTER to my readers but I want to keep it for myself, So today I will show you how to do this,

 Many of will have some gadget that you don't want to show to readers and want to make it visible for ADMINS only, so today you will learn HOW.

The procedure is very very simple, you just need to add two lines to that gadgets code and you are done.
So lets start

1.) Go to Template > Edit HTML and search for the gadget's code you want to hide for readers. You can find it easily using the CTRL + F  command and then putting the name of the gadget.

For example, you want to hide a HTML/Javascript gadget, you will see a code like this:



 <b:widget id='HTML1' locked='false' title='' type='HTML'>


the complete code will be like this


<b:widget id='HTML1' locked='false' title='' type='HTML'><b:includable id='main'><!-- 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'/></b:includable></b:widget> 


Now you just need to put the following two lines in it

  • <span class='item-control blog-admin'>
put it after 
 <b:includable id='main'>

  • </span>
       Put this before
</b:includable>


final code will look 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> 
 If you logout of blogger and go to your blog you'll not be able to view the gadget that you have hidden, but as soon as you sign in again, you will be able see that it.

All the gadgets do not have same to same coding like my example, but I gave you a good explanation above and here it is again, 


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.

Thats it , I hope you like it :)
Share this article
author

This Post Was Written By : Danyal

Danyal , A simple dude from Pakistan , Loves to help others , Blogs as a hobby and Always looking to help people. This Blog is also dedicated to all those who are looking for answers.

Get Free Email Updates to your Inbox!

3 comments:

  1. really informative post. keep posting like this. :)

    ReplyDelete
    Replies
    1. Thanks for your feedback, Keep on visiting , We will do our best to provide more high quality content

      Delete
  2. Iam new to blogger and this post really helped me alot, thanks for the great stuff

    ReplyDelete

 
Copyright © 2014 AskDanyal - All About Internet • All Rights Reserved.
back to top