I am trying to add code for my banner ad exchange into the Advertisement field (Appearance > Theme Options, under Advertisement Settings). However, the ad exchange I am using supplies the code in the script tag (see below); when I add the code into any of the fields and save, the code is stripped out from those fields.
I can add the code in a Text Widget successfully, so I know it works, but not in the fields for the banner sizes of the theme.
Code looks like:
@juniorcitizen, just in case you haven’t solved this
1. Install Shortcoder plugin (recommended by the theme author)
2. Copy the ad code from your Adsense account, paste it in the blank space in the plugin and generate short code; ex- HeaderAd
3. In Theme Options, place the short code as [sc:HeaderAd] in the space where you want to add the header ad.
4. Generate and use short codes for other ads in the same way.
yeap, latest version stripped script code from option value but allow shortcodes.
Thanks all for your replies. I followed Wastabiks instructions and they worked perfectly; using Shortcodes worked a charm. Many thanks!
I faced the same problem, now am going to try the plugin.
He, @richie can’t we make it without using any plugin??
yes but require you to edit the lib/functions/options-functions.php line 534, comment in the line like this
//$newinput[$k] = wp_filter_post_kses($v);
@richie KS, I have tried using the plugin and shortcode and the ad is still not working.
make sure your shortcode name is without space like sc:ads400 not sc:ads 400.
@wastabik thank you, that is exactly what I needed.
Feedback – have this small info (maybe like “script tag not accepted here”) to be added to below the dialog box.
Where do I go to edit this? “edit the lib/functions/options-functions.php line 534”
- The topic ‘Ad Settings don't allow script tag’ is closed to new replies.