How Show /Hide widgets/post/Gadgets in Home/static/archive pages in blog

How Show /Hide widgets/post/Gadgets in Home/static/archive pages in blog:


Hello,
        Today i am gonna to show you that how How Show /Hide widgets/post/Gadgets in Home/static/archive pages in blog as all the Gadgets when you add to your blog this will displayed on every/post and Also on Home page.I think a very Know that Adsense  could disable you account when you put ads units inside the content of your contact privacy policy Page.SO there for i can say that the hiding of several elements inside your blog pages is only  a matter of design but it is also an important requirement.So follow the  following few steps As below..

1st Step:

              In first step go to Blogger Dashboard and then open My blog and then Lay out and Name the HTML/Javascript gadget that you have already added . So after this it become very to identify widgets that you have in your blogger template and then give it unique title that is different then other Gadgets which are already added .

2nd Step:

              In second step go to your template and then click on Edit HTML.

3rd Step:

              Select the Expand widget Template Check box.


4th Step:

             Find the widget title in the HTML By the searching process that is Ctrl+F and then enter the name of Widget name and the similar code will be highlighted in the HTML of HTML codes.
The given code is that represent the Gadget that you have added in the page elements location in Layout.


 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:includable>
</b:widget>  

 5th Step:

               After that you will found that your widget code add the following conditional tags marked with red just below and above to hide widget from specific post or place in blogger at which you want After this you will done. I have some other ways that i want share with you is given below..

    1.         If you want show the widget only on Homepage:



 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>


     2.   If you want to Display the widget only on Posts:



 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>

        3.     If you want to display the widget on a specific page:

replace the red URL of the page with the specific page url

  
 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == "URL of the page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>

    4.      If you want to hide the widget on a specific page :


 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url != "URL of the page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget> 

    5.        If you want to display widget on specific static page:



 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "static_page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget> 

     6.       If you want to want to hide widget on a static page:


 <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType != "static_page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget> 

     7.         If yo want to show the widget only on archive page:



  <b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "archive"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget> 


Note that you need to replace the red highlighted text with the URL of page,post or specific region on which you want to show or hide.....


   6th     At last Save the template and the changes will be saved .
 If you have any problem about this you can comments below..
Thank you!



4 comments:

velraj said...
1 June 2019 at 03:52

I like the information. Good work and keep update more.
Manual Testing Training in Chennai
Manual Testing Training institute in Chennai
Manual Testing Training in Tambaram
Mobile Testing Training in Chennai
mobile automation testing training in chennai
Drupal Training in Chennai
Photoshop Classes in Chennai
Photoshop Course in Chennai

yuvanthi said...
5 June 2019 at 22:01

Nice blog!! I hope you will share more info like this. I will use this for my studies and research.
Angularjs Training in Chennai
Angularjs Course in Chennai
Web Designing Course in Chennai
PHP Training in Chennai
Angularjs Courses in Chennai
Angular Training in Chennai
Best Angularjs Training in Chennai
gst training in chennai
ccna Training in Chennai
web designing training in chennai

quyendz said...
21 June 2019 at 01:41

A debt of gratitude is in order for setting aside an ideal opportunity to talk about this, I feel unequivocally about it and affection adapting more on this point. In the event that conceivable, as you pick up mastery, would you psyche redesigning your online journal with more data? It is greatly useful for me.jogos friv online
Jogos live
jogos friv 4 school

quyen2 said...
12 July 2019 at 06:46

Thank you for your valuable thoughts. You have taught me how to survive the situation by creating a better plan. Visitjogos friv gratis
Jogos online
jogos 4 school

Post a Comment