How to Add a Widget Below First Post in Blogger

Another way of  making  a gadget/widget to appear  below the first snippet in your first read more post is through applying the Blogger conditional tag (<b:if cond='data:post.isFirstPost'>.....Some codes here....</b:if>). Furthermore, if you want to show or hide this widget gadget in a specific page in your blog, you can also use the other Blogger conditional tags.

See Demo Here.

Adding A Gadget or Widget Below First Post Snippet in Blogger


Step 1. Go to your  Blogger dashboard
Step 2. Click  Template and have a back-up of it for your reference.
Step 3.  Hit the Edit HTML button
Step 4. Search the line below  inside the search box and hit Enter to find it
<b:include data='post' name='post'/>
Step 5. Just below it add this code:
<b:if cond='data:post.isFirstPost'>
<div align="center" style="margin:10px auto;">
Your widget that you want to show or hide
</div>
</b:if>

Note:


The code that you are going to put must be parsed properly using a parsing tool.
If you want that the widget that you have added  will appear only in home page of your blog, use the code below:
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:if cond='data:post.isFirstPost'>
<div align="center" style="margin:10px auto;">
Your widget that you want to show or hide
</div>
</b:if>
</b:if>

No comments:

Post a Comment