chevron_right
chevron_right
Exclusion Filters: Removing Ads via CSS Selectors
How-To/Instructional

Exclusion Filters: Removing Ads via CSS Selectors

Last Updated a few days ago
Article Navigation
Introduction
Steps
FAQs
Need Further Assistance?

Introduction

Sometimes, Ezoic’s automated systems may place a placeholder in an unwanted area, such as inside a navigation menu, a specific list, or a high-impact visual element. Exclusion Filters allow you to "blacklist" these areas by identifying their CSS selectors, telling Ezoic’s AI never to insert an ad within that specific container.

Steps

1. Identify the CSS Selector

Before adding a filter, you must find the ID or Class of the element you want to protect.

  1. Open your website in a browser (Chrome is recommended).

  2. Right-click on the specific area where the unwanted ad is appearing and select Inspect.

  3. In the Developer Tools panel, look for the parent tag (e.g., <div class="main-sidebar"> or <section id="author-bio">).

  4. Note down the class (prefixed with a dot, e.g., .main-sidebar) or the ID (prefixed with a hash, e.g., #author-bio).

2. Add the Filter in the Dashboard

  1. Log in to your Ezoic dashboard.

  2. Navigate to EzoicAds > Ad Configuration > Exclusion Filters.

  3. Click the plus (+) button to add a new filter.

  4. Type: Choose "Class," "ID," or "Element."

  5. Selector: Enter the CSS rule you identified in Step 1.

  6. Form Factor: Choose whether to apply this exclusion to all devices or only specific ones (e.g., Mobile only).

  7. Click Save.

3. Verify the Exclusion

  1. Wait approximately 15–30 minutes for the settings to propagate.

  2. Clear your browser cache and view the page in an Incognito window.

  3. If the ad is no longer appearing in that container, but other ads are still visible elsewhere on the page, the filter was successful.

For WordPress-Generated Ads

Repeat Step 1 above and add the CSS Selector as an Insertion Filter in your Wordpress Plugin. 

Choose + Add New Filter to insert a new CSS filter for WordPress placeholders.

 

FAQs

What is the difference between an ID and a Class?

An ID (#name) is unique and should only appear once on a page. A Class (.name) can be used on multiple elements. If you want to block ads in multiple similar sections across your site, use a Class.

Will this delete the placeholder entirely?

It doesn't delete the placeholder from the system, but it prevents the Ezoic script from "filling" that space on the live site.

Need Further Assistance?

If you need further assistance with creating exclusion filters for placeholders, please log in via support.ezoic.com to make use of our dedicated resources for support. We're here to help!

× Enlarged Image

Loading ...