Display Gadgets On Only The Home Page Or Post Pages In Blogger

In this post we have an incredible Blogger trap that demonstrates to you generally accepted methods to have picked contraptions seem just on your online journals landing page or post pages.There are various reasons you may need to just show a device on either post page or landing page for instance in the event that you utilize the read more element you will need devices above and underneath the posts on the post pages.As AdSense just permit 3 units for each page you might need to have a device inside a post which will take into account an additional unit on the home page.You could even give your landing page an entirely unexpected outline to the posts.There are numerous reasons and I'm certain you will discover this Blogger trap extremely valuable planning your blog.So beginning with Gadgets just on the Home page lets perceive how its done.
Steps To Display Gadgets On Home Or Post Pages

If the gadget you want is not already on your blog add it first.For this example i am using a test blog and i am going to use the same recent posts widget.I have already added it to the blogs sidebar.

Name The Gadget - You will later have to find the gadget in your blogs template so to make this easy make sure the gadget has a name or title, i am looking for my recent posts gadget so it has the title recent posts if the gadget you want to move does not have a title just give it the title xxxxx and you can remove it when finished.

Step 1 - In your dashboard Click 'Layout' > 'Edit Html' >
Step 2 - Now you want to find the gadget in your template so i looked for 'Recent Posts' you look for the title of your gadget or xxxxx if you used that name.
The easiest way to do this is to click 'CTRL and F' for a search bar to help find the code - for more info on this click the extra help link at the top of the post.

You want to find a section of code similar to the one below :

<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 != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

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

For some gadgets like your archive the section will be larger but you want everything between :

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

And

</b:includable>


Step 3 - Now we have the code for the gadget we have to add two pieces of code to make it display on the home page only.You can see the two pieces of code i added to make this happen in red below :

<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 != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

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

Copy the code in red and add in place for your gadget.

Take you time and make sure you have it added correctly, once your sure you can save your template.

Adding a gadget to your blog post pages only 

To make a gadget display on the post pages only follow the same steps to find the gadget in your template.The only difference is the code added.This time you use the two piece of code shown below :

<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 != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

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

Once again copy the code in red and put it in place for your gadget.
When your sure the code is added properly save your template and your done.

You can do this with as many items in your sidebars as you like and with any gadgets, if you need extra help you only need ask in the comments.

Drop Your Comments And Questions Below.
Display Gadgets On Only The Home Page Or Post Pages In Blogger Display Gadgets On Only The Home Page Or Post Pages In Blogger Reviewed by Danish Yaqoob on 23:21:00 Rating: 5

No comments

Thanks for your comment.Keep visiting for latest updates from us.
Moreover, Subscribe Now!



FB Instagram Twitter Google+