No ad callback

Posted in: Newspaper
Post count: 364

We are working with a ad network (yyy) that allows to show google adsense (custom_ad_5) if they have no ads for us (xxx) to show. I tried to ad this code to our loop-single.php
<div id="ad-container"></div>
<script type="text/javascript">
function cvNoAdsCallback_xxx() {
document.getElementById('ad-container').innerHTML =

do_shortcode('[td_block_ad_box spot_id="custom_ad_5"]');

}
</script>
<script type="text/javascript" src="http://yyy/xxx/ad-container"></script>

Ok, to be honest, “do_shortcode” (bold row) is not a working command here, but I’m struggling a bit. Has anyone an idea? Thanks, loano

Post count: 7909

Hi,

You try to add a php code in javascript that’s why is not working do_shortcode, unfortunately it is not easy to implement such of code and I cannot provide a solution, I suggest to hire a professional developer to do this for you, as this is not an easy task and we cannot provide custom work at this time, sorry!

Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.