After installing the plugin, You can get a 404 Error on each page you have implemented the plugin. It means you will the 404 Error on the Page.
We use three methods to detect AdBlock.
- Server Request
- Class Request
- Image Request
If you have enabled the Image Request then you can get a 404 error on the image. Because we have used a broken image file.
If you want to disable this image request and make your website free of this error then you can follow the below steps:
But if you disable this method we may unable to detect some of the extensions but most of the extensions are detected.
For PRO users:
- Go to the AdBlock settings
- Inside the Adblock Request section, You will get the option Image Ads inside the Other Request Method.
- Uncheck this option and save the changes
For Free users:
You will not get the option to disable the image ads request from the settings. You have to add a little code to your theme function’s file.
/**
* Disable image ads request
*
* @package chp-ads-block-detector
* @version 1.0
*/
add_filter("adb/checkby/imageads", function($enable){
return false
});
To update the theme function’s file, follow the below step:
- Go to the WordPress Admin Dashboard
- Go to Appearance and Theme File Editor
- Select the Theme from above and select the bar
- Find the functions.php file from the right sidebar
- Add the at the end of the functions.php file.
- [NOTE]: If there is ?> at the end of the file the paste the code above this symbol.