Support » Theme: MesoColumn » Ad Settings don't allow script tag

  • Resolved juniorcitizen


    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:

    <script type='text/javascript' src='http://xxx'></script>

Viewing 13 replies - 1 through 13 (of 13 total)
  • Same problem here. The AdSense codes don’t work.



    Forum Moderator

    @wastabik: If you require assistance then, as per the Forum Welcome, please post your own topic.

    Thanks esmi.

    @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.

    Theme Author Richie KS


    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??

    Theme Author Richie KS


    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.

    Please advise.

    Theme Author Richie KS


    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”

    Theme Author Richie KS


    you can’t edit via wp-admin->editor, you need ftp access and manual edit the php file above.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Ad Settings don't allow script tag’ is closed to new replies.