Hello,
I am trying to add a skyscanner travel search widget to my site. I have successfully placed it in the sidebar by placing the code in a text widget. When I enter the code in the sidebar ad through the theme panel and then use the ad widget and select sidebar it does not display.
I would be happy to leave as a sidebar widget, however now I want to add to mobile. I am using the mobile theme. I read documentation on using mobile ads in the mobile theme but same problem as above, nothing shows up.
You can see the text widget in sidebar working here: http://www.papousse.com/tofino/
I have followed skyscanner instructions to add this code (with my own WIDGET-KEY) to header.php:
<script type=”text/javascript” src=”//api.skyscanner.net/api.ashx?key=[WIDGET-KEY]”></script>
Then I have the code below which I put in the sidebar text widget. Again it works in there, but when I use this same code in the ad section of the them (mobile or not) nothing displays.
<script type=”text/javascript”>
skyscanner.load(“snippets”,”2″);
function main(){
var snippet = new skyscanner.snippets.SearchPanelControl();
snippet.setShape(“box300x250”);
snippet.setCulture(“en-GB”);
snippet.setCurrency(“CAD”);
snippet.setColourScheme(“classicbluelight”);
snippet.setProduct(“flights”,”1″);
snippet.draw(document.getElementById(“snippet_searchpanel”));
}
skyscanner.setOnLoadCallback(main);
</script>
<div id=”snippet_searchpanel” style=”width: auto; height:auto;”></div>
Any suggestions?
Thanks!
Hello,
I have tested your ad but it seems to work fine if you use this method of implementing it: https://forum.tagdiv.com/using-other-ads-non-adsense-ads/
Here is an example of it on a page using and ad block in visual composer: http://screencast.com/t/Cv9Ka6no
I placed the ad code in a custom ad spot in the theme panel like so: http://screencast.com/t/ergQJi8SE
On the mobile theme you have to place the script in the head tag again as the mobile theme uses a different header.php file: http://screencast.com/t/qW43t8Ca
I placed it as an article top ad: http://screencast.com/t/UrTiLY3bP – http://screencast.com/t/RXbjQ5spUG
Thank you!
Hi Bogdan, thanks so much for your thorough reply including all the screenshots. I did eventually get the ad working in the sidebar via the theme panel Ads section – I think even though I was deleting cache after each try it may have been a caching issue.
I also got it working on mobile but it did not work when I placed the script in the head tag of child theme > mobile > header.php – I had to place it in the original theme mobile header file. Oh well, it is showing up! I will re-add the code when there is an update.
One more funny thing, do you know what the empty black bar is at the top of the mobile site above the logo, menu and search header? screenshot: http://www.screencast.com/t/gjJfA0VzAe
Thanks so much. I’m loving the theme đ
Hi,
That seems to be the wp admin bar. It should not be showing up if the user is not logged in. That is a strange issue. It could also be a caching issue. Please use wp super cache and these settings:
https://forum.tagdiv.com/cache-plugin-install-and-configure/ and for a cdn server: https://forum.tagdiv.com/cloudflare-cdn/
I hope this helps.
Thank you!