Other ad codes not displaying in custom ads

Posted in: Newsmag
Post count: 15

Hello,

I’m serving my ads through DFP and I followed the instructions on how to setup other ads because I plan on having the ads served locations not set by the theme.

Only issue is I need to call the shortcode in the loop-single.php template file which I did like this:

<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_4"]');?>

I know it works for image ads because I have another custom spot with the ad being displayed but it doesn’t seem to work for non-adsense scripts. Below is the script I put in the custom ad settings of the theme panel.

<div id='single-bottom-custom-flex' class="td-pb-padding-side td-pb-border-top aligncenter">
<script type='text/javascript'>googletag.cmd.push(function() { googletag.display('single-bottom-custom-flex'); }); </script>
</div>

I can see the script in the source code yet the publisher console doesn’t recognize the unit. Hard coding the unit works but I need it to be done via theme panel’s custom ad. What’s preventing the custom ad from displaying the unit?

Post count: 15

UPDATE

Ok so I went for lunch came back and checked the code again. Regenerated the tags and now it works…

Consider this as solved.

Thanks.

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