Responsive ad doesn't work with adrotate on custom ad

Posted in: Newspaper
Post count: 46

Hi,

I tried to put a custom ad with adrotate shortcode wich works fine with bottom ad in responsive but doesn’t work with custom ad shortcode on php.

I want that the custom ad 1 with adrotate displays only on phones, i put this code in the loop single file but the ad displays on dekstop too while i deseabled it :

<?php echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_1″]’); ?>

Thank you for your help and sorry for my bad english

Post count: 6600

Hi,

You can hide the custom ad on tablets and desktop screens via css using this custom css:

@media(min-width: 767px){
.td-g-rec-id-custom_ad_1, .td-a-rec-id-custom_ad_1 {
display: none;
}
}

Not sure what type of ad your use but this should work if you turn it off from theme panel also. I have tested this using both adsense and banners and works fine.

Thanks

Post count: 46

Hi Lucian,

Thank you it works fine !

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