WP Manifestindependent plugin directory
manifest / utilities / st-adblocker-detector

ST AdBlocker Detector

A WordPress plugin that detects ad blocker extensions and blocks website access until the visitor disables it.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/sampaththaranga/st-adblocker-detector/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin by Sampath Tharanga

Detects ad blocker browser extensions and completely blocks website access until the visitor disables their ad blocker.


Features

  • Detects all major ad blockers (uBlock Origin, AdBlock Plus, etc.)
  • Full-page overlay blocks site access when ad blocker is detected
  • Customizable popup title, message, and buttons
  • Overlay background color & opacity control
  • Blur background effect
  • Randomized CSS class names to evade ad-blocker blocklists
  • NoScript fallback for JavaScript-disabled browsers
  • Hide on mobile option
  • Clean, modern admin settings panel
  • Lightweight — no jQuery dependency on frontend

Installation

  1. Download the latest release ZIP from the Releases page
  2. Go to WordPress Admin → Plugins → Add New → Upload Plugin
  3. Upload the ZIP file and click Activate
  4. Navigate to ST AdBlock in the admin menu to configure settings

Requirements

  • WordPress 5.2 or higher
  • PHP 7.2 or higher

Settings

Option Description
Enable Plugin Turn detection on or off
Popup Title Heading shown in the popup
Message Content Body text (supports HTML via WP Editor)
Popup Width Width of the popup box (in %)
Overlay Color Background color of the overlay
Overlay Opacity Transparency of the overlay (50–100%)
Blur Background Blurs the site content behind the overlay
Refresh Button Show/hide with custom label
Close Button Show/hide with custom label
Hide on Mobile Skip detection on mobile devices
NoScript Fallback Block users with JavaScript disabled
Header Injection Inject scripts via wp_body_open hook

Screenshots

Frontend — Ad Blocker Detected Overlay

Ad Blocker Detected

License

GPL v2 or later — see LICENSE


Developer

Sampath Tharanga


References & Inspiration

This plugin was built with reference to the architecture and detection techniques used in the following open-source WordPress plugin:

Detail
Plugin Name CHP Ads Block Detector
Author Suresh Chand
Author URI https://sureshchand.com.np
Plugin URI https://chpadblock.com
License GPL v2 or later

Concepts referenced from CHP Ads Block Detector:

  • Google Ads script probe — Loading pagead2.googlesyndication.com/pagead/js/adsbygoogle.js and checking if window.adsbygoogle is defined, as a reliable method to detect network-level ad blockers.
  • CSS class-based detection — Injecting a hidden decoy <div> with common ad-related class names (.adsbox, .adsbygoogle, .Ad-Container, etc.) and checking if it gets hidden by the ad blocker.
  • FairAdblock detection — Checking for the presence of a #stndz-style element injected by the FairAdblock extension.
  • Randomized class names — Generating obfuscated, site-specific CSS class names to prevent ad blockers from targeting the overlay by class name.
  • NoScript fallback — Wrapping the block overlay in a `