Friday, November 23, 2012

Widgets

0

How to Restrict Blogger widgets

  • Friday, November 23, 2012
  • Unknown
  • show and hide blogger widgetsBlogger widgets need to be controlled by restricting them display  where want them.So there are man questions that hiding a division
    or widgets.To do this before adding any widget as adding simply HTML/Script code to your blog a two piece of code is necessary to be added to show and hide those codes in displaying.
    Here we had posted codes about how to control the display of widgets in blogger.We can control or restrict even the blogger official widgets using this code.

    Show  Blogger widgets only on Homepage

    To show a widget only on home page,before adding that widget code blog just put those code in below code and paste it.

    <b:if cond='data:blog.url == data:blog.homepageUrl'>
    PASTE YOUR WIDGET CODE HERE
    </b:if>
    Replace YOUR  PASTE YOUR WIDGET CODE HERE with code of the widget.

    Hide  Blogger  Widgets on Homepage



    <b:if cond='data:blog.pageType == "item"'>
    PASTE YOUR WIDGET CODE HERE
    </b:if>

    Replace YOUR  PASTE YOUR WIDGET CODE HERE with code of the widget.

    Show  Blogger Widgets on Static Page

    <b:if cond='data:blog.pageType == "static_page"'>
    PASTE YOUR WIDGET CODE HERE
    </b:if>
    Replace YOUR PASTE YOUR WIDGET CODE HERE with code of the widget.

    Hide  Blogger  Widgets on Static Page

    <b:if cond='data:blog.pageType != "static_page"'>
    PASTE YOUR WIDGET CODE HERE
    </b:if>

    Show  Blogger Widgets on Selected Post


    <b:if cond='data:blog.url == "URL OF Selected Post"'>
    PASTE YOUR WIDGET CODE HERE
    </b:if>


    Hide  Blogger  Widgets on Selected Post


    <b:if cond='data:blog.url != "URL OF Selected Post"'>
    PASTE YOUR WIDGET CODE HERE
    </b:if>

    Follow same procedure of all the widgets are same just replace the PASTE YOUR WIDGET CODE HERE with widget code which you want to control.



    How to Restrict Official Blogger Widget

    For all widgets either official or third party the code are the same but the application will be different.Official blogger widget can be controlled by editing the template.

    1.Log in to blogger.
    2.Then click template and click proceed with HTML.
    3.Then check the check box to expand widgets at top left of the blogger editor.
    4.Then just find the widget simillar to below code.



    <b:widget id='HTML' locked='false' title='WIDGET-TITLE-HERE' type='Profile'>
    <b:includable id='main'>
    HERE WILL BE SOME CODE BLOCKS
    </b:includable>
    </b:widget>
    There will be some line of coding instead of HUGE CODE BLOCK,Noproblem just cocentrate of the widget title which matches the WIDGET-TITLE-HERE with what you want to control.After that just add the above control codes to that above code in TWO BLUE LINE as what below we added .

    <b:widget id='HTML' locked='false' title='TITLE-OF-WIDGET-HERE' type='Profile'> <b:includable id='main'> <b:if cond='data:blog.url == data:blog.homepageUrl'> some codes here </b:if> </b:includable> </b:widget>



    How to show and hide a Blogger Division

    Here we explain how to control or restrict divisions in blogger template.In this case you may required to hide or show a division like sidebar,left sidebar or right sidebar ..etc..,It is same of above case to control official widgets.Just find the name of ID or CLASS of that portion by right click and inspect element in widget while in browser to find name.You can find codes some thing like below.
    <div id= "" or class =""> THERE WILL BE SOME CODES </div>

    Then add the control codes first line that starting of that code and add it before <div>

    <b:if cond='data:blog.pageType != "static_page"'>

    then tough task to find closing tag just search there may any closing tag for div but you should find appropriate tag otherwise it will produce xml error.So before editing template always try to take backup.

    Did you find anything missing or having trouble comment below.?

    0 Responses to “ How to Restrict Blogger widgets ”


    *Important - If you want to be informed of any replies to your comment, check the "Subscribe By Email" before submitting. Please Do Not Spam

    Post a Comment