Hi,
i have been trying 3 days now to add a “content click” code to my site. This is a typical “trending news” type widget (ads) I have the code which is:
<div id=”contentclick4273″></div>
<script type=”text/javascript”>
(function() {
var data =
{
pub_id: “1936”,w_id: “4273”,pw: “5a632ecbebafe4″, cbust: (new Date()).getTime()
};
if (typeof widgetCheck4273 === ‘undefined’) {
var u=””;
for(var key in data){u+=key+”=”+data[key]+”&”}
u=u.substring(0,u.length-1);
var a = document.createElement(“script”);
a.type= ‘text/javascript’;
a.src = “https://api.contentclick.co.uk/pub_serve.php?” + u;
a.async = true;
document.getElementById(“contentclick4273”).appendChild(a);
window.widgetCheck4273 = “set”;
}
})();
</script>
And the content click support says i need to add this in the “single.php” area. She said i need to place it right below this code: <?php the_content();?> But i can’t find this code anywhere, i have played about alot with it, and can get it added above the post, sidebar and right at the bottom of the site, but i need it directly below the content, just before FB comments section.
Please take a look and advise where i add this code.
My site is: http://thebrizzle.com
Thanks alot,
Jonny
Hi
To add the widget below the content you need to place the code in the file corresponding with the post template used: http://screencast.com/t/zQfkk9vaL7aQ We don’t use the the_content(); function in our post templates because wont’t allow ads, so we use a custom function: get_content();
Thanks!
Hi thanks alot for your reply,
i have managed to get it almost where i need it, but its under the FB comments widget i have. But the main problem is for some reason its not appearing on mobile, any ideas why?
here is my site: http://thebrizzle.com
Thanks,
jonny
Hi
I don’t see any widget below the fb comments http://screencast.com/t/P5xNEGqUX also I don’t know exactly how the script you provided above works on mobile so you could contact the provider and ask him for advice.
Thanks!
Eh thats very strange, its showing on all posts for me?
Do i need to add this code to all loop.single.php?
Thanks