How to Hide AdSense on Blog Search and Label Pages

How to Hide AdSense on Blog Search and Label Pages - Running ads on the search label page and especially search blog posts, is an action that is very risky for the health of Google Adsense accounts. You might get an Adsense account banned. Because, we as blog / website owners can not control the fad of visitors who can modify the label search URL, and enter the keyboard search page, with keywords that have nothing to do with blog content, and even tend to be inappropriate.

How to Hide AdSense on Blog Search and Label Pages

Even more so if visitors are angry because of family problems or because of debt problems, and vent their anger on the Adsense account installed on our blog, through the blog search column (data:blog.searchQuery) or modify the URL label search page link (data:blog.searchLabel) becomes something that smells of adult keywords or 18+.

For example, the blog URL from the results of visitors when using the blog search widget, it will be like this:

https://setupgaming.blogspot.co.id/search?q=download+video+meler+mp3.5

Or if the blog label page's search URL is modified, it will look like this:

https://setupgaming.blogspot.com/search/label/Download%20Video%20meler&max-results=8

download+video+meler+mp3.5 and Download%20Video%20meler is a keyword that is inappropriate for the results of blogging. Whereas obviously the blog discussed about the setup of cheap gaming laptops. In fact modified into something slimy.

Attention: Keep in mind, even though the keyword search blog page and URL of the search labels page are not contained in the blog content, the page will not be redirected to page Error 404. He will still open on his own page.

On the other hand, displaying Google Adsense ads on blog article search pages, it should not be necessary. Because there is no effective content on the page. If a blog page does not have effective content, then the page is not suitable to display Adsense ads. Apply the following ways to keep your Adsense account from being banned, before it's too late.

How to hide Adsense ads in the header, sidebar or footer if you use the HTML/JavaScript Widget


1. Make sure you already know the HTML ID for the Adsense ad code widget on your blog. That is by going to Layout, click edit on the HTML / JavaScript widget that contains the ad code.

In this tutorial, suppose the attribute ID for your Adsense ad code is "HTML2"

2. After that go to Theme >> Edit HTML, look for the "HTML2" code. The trick press the ctrl + f key then type "HTML2" in the search field that appears, then press enter.

How to hide Adsense ads in the header, sidebar or footer if you use the HTML/JavaScript Widget

3. In the HTML2 ID attribute, find the code <b:includable id='main'> then put the following conditional tag code under the code:

<b:if cond='data:blog.pageType == &quot;index&quot; and data:blog.url != data:blog.homepageUrl'>
<b:else/>

4. Still on the same attribute ID, find the code <b:includable> then place the closing code of the following conditional tag just above the code:

</b:if>

So that for steps 3 and 4, the method of implementation will look like in the following picture:

How to hide Adsense ads in the header, sidebar or footer if you use the HTML/JavaScript Widget

5. After that Save the Theme.

How to hide the Adsense ad code inside the HTML template


Even though in the HTML theme, this type of advertisement is always displayed in all pages, such as Ads Page Level ads, or floating ads.

1. The trick is easier than the one before, which is to stay like this:

<b:if cond='data:blog.pageType == &quot;index&quot; and data:blog.url != data:blog.homepageUrl'><b:else/>
Adsense ad code is placed here….
</b:if>

2. After that Save the Theme.

Actually there are still other ineffective pages for Adsense ads, such as the 404 Error page and static pages. If this page is combined with a blog search page and label search, the way to implement it will be like this:

<b:if cond='data:blog.pageType == &quot;index&quot; and data:blog.url != data:blog.homepageUrl'>
<b:else/>
<b:if cond='data:blog.pageType != &quot;static_page&quot; and data:blog.pageType != &quot;error_page&quot;'>
Adsense ad code is placed here…
</b:if>
</b:if>

Or if you want to keep showing ads on static pages, and don't want to display ads on the blog search page, search label, and 404 error page page, then the way to implement it will be like this:

<b:if cond='data:blog.pageType == &quot;index&quot; and data:blog.url != data:blog.homepageUrl'>
<b:else/>
<b:if cond='data:blog.pageType != &quot;error_page&quot;'>
Adsense ad code is placed here…..
</b:if>
</b:if>

Anyway, just play your Conditional Tag, according to the concept you want. Until now, the way to hide Adsense ads above is still 100% effective to avoid banned Adsense ads from the things mentioned above.

As an additional note, the above method can not only be applied to Google Adsense ads, but other ads. It's just that Adsense is more stringent, so the focus is on Adsense.

That's the tutorial that I can share about How to Hide AdSense Ads on Blog Search and Label Pages. Hopefully it can be useful and good luck.

Provide comments relevant to the posted articles and provide critiques and suggestions for the progress of the blog