July 26, 2016

How to Hide Widgets on a Specific Page / Posts

2 Days ago I posted on how to remove all sidebars on a specific page which actually works on blogger post as well. Today my dear friends we will be doing similar tweak but instead of the whole sidebar widgets we will only be hiding specific widgets on specific pages or specific posts. On this tutorial we will be hiding the Label Widget whenever we open the this post. It is actually pretty simple so let's get started.






Step 1. Get the Widget's ID
- On the screenshot below my "Recent Posts" Widget's ID = HTML1 while CLASS = widget HTML
- We should be using the Widget's ID not the Class




Step 2. Proceed to EDIT HTML.


Step 3. Add this Code below </b:skin>.
Codes in Green - Just simply replace the #HTML1 with your desired Widget's ID to be hidden.
Codes in Yellow - The URL of the page / post where you want to hide the desired Widget


<b:if cond='data:blog.url != " http://tgsbd.blogspot.com/ "'>
<style>
#HTML1 {
display: none;
}
</style>
</b:if>