Showing and Hiding Blogger Widgets Only on Certain Pages

Showing and Hiding Blogger Widgets Only on Certain Pages
Blogger's conditional tags allow you to show or hide widgets / gadgets on certain pages. For example, only want to display the popular post widget on the homepage, or hide AdSense ads only on static pages (pages) only, and so on.

1. Displaying Widgets on Specific Pages

This means that the widget will only appear in one place specified.

1. Enter the Blogger dashboard and go to the menu Layout (Tata Letak).

2. Select the widget that you want to restrict and edit by clicking the pencil icon on the right.


3. A new browser window will appear small. Here we will only find out the ID of the widget. Pay attention to the arrangement of the URLs in the address bar, highlight them to the end and you will find the parameters widgetId=xxx. xxx is the ID that we are looking for. In the example image, the ID is HTML1. Do not do anything to the widget. Just close the window after the ID is found.
Widget Id=HTML1
4. Then go to the menu Theme and click the button Edit HTML.
5. Click the button Jump to widget and select the name of the ID that you successfully found in the previous step.
Jump To Widget
6. In this example, I want to display widgets only on single post pages. Then the conditional tag used is data:view.isPost. If you want to display it on another page, use another conditional tag whose full code you can find in the Latest Blogger Page Conditional Tag .
7. Now it's time to edit the widget code. For example the full code like this:
<b:widget id='HTML1' locked='false' title='Author' type='HTML' version='2' visible='true'>...</b:widget>
Add the code cond='data:view.isPost' "BEFORE" id='HTML1'. Then the end result will be like this:
Remember, you can edit data:view.isPost span style="vertical-align: inherit;">with other page conditional tags.
8. After that save the settings by clicking the button Save theme.

Post a Comment

Post a Comment (0)

Previous Post Next Post