Displaying different Ads

Posted in: Newsmag
Post count: 5

Hi,

I am using Amazon Banner Ads for desktop and google ads for table and mobile. When I use the google adsense code, it overwrites my amazon banner.

I have the three tags that are used in the header ad template. I need my Amazon Ad to display only on desktop and my google adsense ad to only be displayed on mobile and tablet. How can this be fixed?

This is what I am currently using.

<div class=”td-visible-desktop”>
<div class=”alignleft”>
<script type=’text/javascript’>
amzn_assoc_ad_type = ‘banner’;
amzn_assoc_tracking_id = ‘xxxxxx’;
amzn_assoc_marketplace = ‘amazon’;
amzn_assoc_region = ‘US’;
amzn_assoc_placement = ‘assoc_banner_placement_default’;
amzn_assoc_linkid = ‘xxxxxxxxx’;
amzn_assoc_campaigns = ‘amazonhomepage’;
amzn_assoc_p = ’48’;
amzn_assoc_banner_type = ‘rotating’;
amzn_assoc_width = ‘728’;
amzn_assoc_height = ’90’;
</script>
<script src=’//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1′></script>
</div>

</div>
<div class=”td-visible-tablet-portrait”>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– NewsWatch33 –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-xxxxxxxx”
data-ad-slot=”xxxxxxxx”
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div class=”td-visible-phone”>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– NewsWatch33 –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-xxxxxxxxx”
data-ad-slot=”xxxxxx”
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>

Post count: 7909

Hi,

The theme ad system was designed to work with adsense code and the theme will make it responsive and the ad will fill the available space. Unfortunately the theme doesn’t have an option to rotate banners, you will have to use a plugin for this, many users are using AdRotate or Simple Ads Manager. Those divs are recommended for non-adsense code and your banners need to have a specific size fore each device as the theme will not handle it, like you can see in the example each image used there has a specific size – https://forum.tagdiv.com/ads-system-full-guide/

Thanks!

Post count: 5

Ok, I am using an ad rotating plug in for the header ad but when I put the <php> code in place of where your code was, it misaligns the ad. I need the correct css tags to use in the header-style-1.php file so that the ad will show the same way as if I used the theme provided code.

Thank you

Post count: 6600

Hi,

You can’t use php code in the ad code section, thee theme doesn’t handle php codes added there. Add there the shortcode corresponding to your ad provided by the ad plugin. ex: http://screencast.com/t/me7NQ36x and place your ad code in the plugin.

Thanks

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