How to Detect AdBlock Users in WordPress
If you use advertising as a monetary resource on your site, then you won’t benefit from visitors who use adblock. To detect them, install and activate the adblock detector plugin
then go to Ad Blocking to configure.
Here you can either edit the default shortcode or create a new one.
I’ll edit this one. We’ll add a description here.
And if no ad block is detected, you can add something here maybe your ad code if you want.
When adblock is detected you can display a message to just the users who have adblock enabled.
You can always style it how you want here.
Now that we’ve created the shortcode, we need to add it to our site. The easiest way to add it to your whole site is to go to Appearance — > Widget.
And add the ad blocking detector widget to your sidebar.Once we click save.
We can go to the site to see it in action.
Since I don’t have adblock on I’ll see this message. If you want to see what it says with adblock enabled, just install the adblock plus for chrome and you’ll be able to see a message like this.