Thanks for the update. If it’s OK, I’d like to clarify two things.
I didn’t include any code in the ad code area box
So you’re not using the ad feature in HD Quiz, and are just using your site’s regular ads?
ads appeared […] or when the user answered incorrectly
This was never a thing that HD Quiz did. I’m guessing that your Google Adwords set just decided to place some ads in the “extra” text area on its own. It would also only show ads after every 5th question if you are using the adcode feature. Basically, whatever you put in there, (an image, text, adcode, HTML, whatever) would show after every fifth question.
I have a theory, though, based on some things.
First, you said that you are now getting WAY more ads than normal. Second, you said that the ads used to appear after every 5th question, even though you were not using that feature (this means that Google decided to do this all on its own, which is very coincidental).
Have you EVER in the past put adcode into that section? Right now, my best guess is that you had adcode there in the past and saved. The code is now stored in your database ready to go. However, perhaps due to some other security plugin you had at some point, when loading this code, the scripts were being stripped out.
The ONLY change to ads in this latest version is that before printing the ads, the code is run through WordPress’ the_content
filter. This is so that users can also use shortcodes in that section, allowing us to be compatible with ad mangers and things. If I’m right, then this might explain the behaviour.
If this is the case, you have two possible options to test / fix.
- Just enter some random text into the adcode area and save. This should flush out any old data that you previously had saved. You can then remove all content from that area and save again.
- If that doesn’t work, you can always edit the plugin directly.
If you edit ./hd-quiz/includes/template.php
on around line 99
you will see
$hdq_adcode = apply_filters("the_content", stripcslashes(urldecode($hdq_adcode)));
You can change that to:
$hdq_adcode = stripcslashes(urldecode($hdq_adcode));