Forcing a specific dimension adsense unit above the title only mobile only

Posted in: Newspaper
Post count: 60

I have both (1)320×100 adsense code and (2) responsive adsense code

How do you configure the theme options to display a 320×100 (not responsive) adsense ad on mobile devices as the first thing on the page (below the nav bar and above the title of the post) so it would be:

NAV BAR (hamburger nav / logo / search icon)
320×100 adsense ad
Title of Post
Share Buttons
Content

And then at the same time use a responsive adsense unit for the header on tablet/desktop versions of the site? Right now I have the responsive adsense unit in theme panel > ads > header and know I can disable it on mobile by switching off “Mobile”. Theme docs say I shouldnt use this, but perhaps it makes sense in this situation?

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

Thanks!!

Post count: 7909

Hi,

The theme ad system was designed to work with adsense code, but you cannot add 2 codes in the same spot if this is what you mean.
A solution to have another ad(code) on mobile device will be to paste your code in a custom ad and use do_shortcode function to place it bellow the menu. I don’t know what header style you use, but for example if you use the default template(style 1) you will have to edit header-style-1.php file something like this – http://screencast.com/t/lNgxrndDO If both codes are adsense you can control the them from Theme Panel(disable/enable on specific devices) – http://screencast.com/t/qpivlfocehttp://screencast.com/t/Zm5sI295oJ If one of them is not adsesne you can use those div containers – https://forum.tagdiv.com/header-ad/

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

Result: http://screencast.com/t/wRTRcHElUNnhttp://screencast.com/t/c8gXY3uDqc

Thanks!

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