Making script ads show

Hello again
We try to implement some ads in our site. The problem is to find one way to do it that makes those different kinds of ads actually show up. For instance the script below won’t show up if I put it in a text module, in a tab module or in a html module…
How can we achieve this?
Is the only/ best way to use an extra plugin, like this? https://wordpress.org/plugins/ad-inserter/ or https://wordpress.org/plugins/enhanced-text-widget/ - or should I rather think in some other direction?
Thanks,
Kjetil


<script src="//api.skyscanner.net/api.ashx?key=3a55e635-ab67-4aee-9eb8-8aa96a83d70f" type="text/javascript"></script><script type="text/javascript">// <![CDATA[
// < ![CDATA[
// < ![CDATA[ skyscanner.load("snippets","2"); function main(){ var snippet = new skyscanner.snippets.SearchPanelControl(); snippet.setShape("box400x400"); snippet.setCulture("nb-NO"); snippet.setCurrency("NOK"); snippet.setProduct("flights","1"); snippet.setUrlParam("associateid", "AFF_TRA_00074_00008"); snippet.setUrlParam("p", "224464"); snippet.setUrlParam("a", "2516843"); snippet.setUrlParam("g", "20834922"); snippet.setClickUrl("http://clk.tradedoubler.com/click?p=224464&a=2516843&g=20834922&url=@@url@@"); snippet.draw(document.getElementById("snippet_searchpanel")); } skyscanner.setOnLoadCallback(main);
// ]]></script>
<div id="snippet_searchpanel" style="width: auto; height: auto;"></div>

Hey Kjetil,

I tried adding the script above on my local dev running the Twenty Sixteen theme without any plugins activated - just on the regular WP native editor, and I still can’t see anything. Does it really output anything? Can you try the same thing on your end and see if you get something?

Ben

Hm… No, that is the problem. Nothing shows up.
What you tell me is that basically this script doesn’t work.
I’ll check it out with Skyscanner, then. They ought to make something that works on the most popular CMS on the planet.
Thanks

…but just to make things clear, similar scripts should work in all different types of modules, even in tabs?
Kj

HI KJ,

If you want to add scripts, you will want to consider only using the HTML module. Adding scripts to things like Tabs, will likely cause issues.

Thanks,
Danny

Thought so - though I hoped not :o)
Kjetil