AD custom version for mobile

Posted in: Newspaper
Post count: 116

Hi, i use AD Rotate but this is not important.

For every AD is use a desktop and mobile version and i have 2 size of banner:
– desktop 728×90 and mobile 468×60 mobile
– desktop 1070×100 and mobile 468×60 mobile (this only in the pages).

I try to place this code that i find in the theme but i do not see the AD in smartphone portrait.
How to solve?

<div class="td-visible-desktop">
<a href=""><img src="/wp-content/uploads/banner.png" alt="banner" height="90" width="728" /></a>
</div>

<div class="td-visible-tablet-portrait">
<a href=""><img src="/wp-content/uploads/banner_mobile.png" alt="banner" height="60" width="468" /></a>
</div>
  • This topic was modified 9 years by 22p.
  • This topic was modified 9 years by 22p.
Post count: 22421

Hello,

Well you only use the div’s for the desktop and tablet. The mobile phone is not present so your ad will only show up on desktop and on tablets. It will not show up on phones using the code above. You also have to add this container:

<div class="td-visible-phone">
<!-- Your NON AdSense code here - this ad will show only on phones -->
</div>

Thank you!

Post count: 116

Please confirm this code for desktop, tablet and also smartphone?
For smartphone best is 320px OR 375px?

<div class="td-visible-desktop">
<a href=""><img src="/wp-content/banner.png" alt="#" height="100" width="1070" /></a>
</div>

<div class="td-visible-tablet-portrait">
<a href=""><img src="/wp-content/uploads/banner_mobile.png" alt="#" height="60" width="468" /></a>
</div>

<div class="td-visible-phone">
<a href=""><img src="/wp-content/uploads/banner_mobile.png" alt="#" height="60" width="320" /></a>
</div>
  • This reply was modified 9 years by 22p.
Post count: 20688

Hi,

The code seems valid, it should display properly on the devices you want. I believe the ad size should be 320px, according to the recommendations – https://support.google.com/adsense/answer/6002621?hl=en

Thanks

Post count: 116

Hi Simion, i do not use for adsense!
I need to use for custom AD.
Confirm that 320px and other size are correct?

Thanks.

Post count: 20688

Hi,

That would be fine. That was just a list of top performing ads regarding the size, as specified by Google. You can choose and use any ad size you think it’s best for your website. I cannot confirm what ad sizes you should use for your website.

Thanks

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