0

I'm running WordPress with BuddyPress. So I noticed a lot of AdBlocker are causing bugs on my site like to remove the Google reCAPTCHA and people aren't able to register to the page without notice. To inform the user that this not a bug of my Website I would like to include some simple text to the registration page (and hopefully without any plugin and core digging).

Does anyone know a way to do this? As example via theme functions?

0

Please see this thread: https://stackoverflow.com/questions/4869154/how-to-detect-adblock-on-my-website

This possible by creating a javascript file in your theme folder, enqueue it properly and than execute some message (maybe in jQuery model, or alert box in JavaScript)

4
  • Maybe this is an idea to use an Anti Adblock, but this will be more code on all sites. Is it not possible to add some code only into the Register form?
    – Deex
    Oct 23 '15 at 0:42
  • Yes, you might need to make an if statement before all this, recognizing if current page is register page, then execute this code, and if adblock is installed, execute some code. Can you see what I mean? :) - All this is possible from the functions.php page (theme) Oct 23 '15 at 6:48
  • I think the idea to use a adblock detection was the best. Maybe this is the best way instead of placing static warnings all over my site. Thanks a lot
    – Deex
    Oct 23 '15 at 10:56
  • You are most welcome :) Oct 23 '15 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.