Rate Your Experience

Excluding Ezoic Ads for a WordPress Category

Modified on: Wed, 17 Jan, 2024

The Disable Ads by Page tool is useful at stopping ads from showing on pages which ads wouldn't be a good fit for. However, you may have an entire WordPress category on your site that you want to stop ads showing under. Adding each of these URLs to the list of excluded pages can be tedious unless they all fall under the same URL path (and can therefore be excluded via 'Directory'); and you would need to remember to add any new pages for that category, in future.


Unfortunately, WordPress does not have a set way of labelling URLs based on what category they belong to, which makes it a little bit trickier to exclude ads on a per category basis. Thankfully, there is a way of accomplishing this - with the Ezoic WordPress plug-in.


Excluding Category via Meta Tags


One way of defining a category for exclusion via the Disable Ads by Page tool is through setting a meta tag to all posts under a category. You can do this using the Ezoic WordPress plug-in.


1. Inside your WordPress admin dashboard, go to "Settings > Ezoic".


2. Select "Ad Settings".


3. Select the cog at the top right:


image


4. Find the "Meta Tags" section and select "+ Add Meta Tag":


image


5. Select "Post Categories" under "Display Locations":


image


6. Select the category / categories that you want to set the meta tag for.


7. Under "Select Attribute", choose "Custom Meta Tag".


8. You can enter whatever you want inside the "Name" and "Content" fields. We would recommend using something similar to "ExcludeAds" and "1". Remember what you enter here, though, as you will need to use this information later.


image


9. Select "Create".


10. Log in to your Ezoic publisher dashboard.


11. Select "EzoicAds" > "Ad Restrictions".


12. Where it says "Page Rules", select "Meta Tag" from the drop-down menu:


image


13. Select "New Restriction":


image


14. Add a rule that matches the "Name" and "Content" that you set previously. In this example, we're adding "ExcludeAds" as the Meta Tag Name and "1" as the Content:


image


15. Select "Create Rule".


It may take up to an hour for this change to take effect, but ads should now stop showing on any page that has the defined meta tag. That should include all of the categories that you selected in Step 6.


Please note that excluding ads from a page / category will have an impact on your site's overall revenue - and we would recommend against doing this, except for as a last resort.



Loading ...