How to Hide Unwanted Google Search Ads Using Custom Adblock Plus Filters
This guide walks through identifying intrusive Google search elements—such as related YouTube videos and product promos—and shows how to create Adblock Plus custom filters that hide those elements by targeting their CSS classes or IDs, complete with code examples and screenshots.
When performing a Google search, related YouTube videos and Google product results often appear alongside the desired results, making the page look cluttered after script optimization. By consulting the Adblock Plus custom filter documentation, a practical solution can be implemented.
The page structure reveals that the unwanted elements are wrapped in containers such as div with class="textad" and div with id="sponsorad". Hiding the element with id="acid_src" also removes a related ad.
Based on this observation, the following filter rules can be added to Adblock Plus:
<div class="textad">Cheapest tofu, only here and now!</div>
<div id="sponsorad">Really cheap tofu, click here!</div>
<textad>Only here you get the best tofu!</textad>These examples illustrate three different ad containers. The corresponding filter syntax is: ##.textad – hides any element with the class textad. ###sponsorad – hides the element whose id is sponsorad. ##textad – hides any element named textad regardless of its attributes.
By adding these rules to the Adblock Plus custom filter list, the unwanted ads disappear from the Google search results page.
The author invites readers to discuss the approach further and welcomes feedback.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
