Hey,
I would like to add a custom ad (300X250) that would show only on mobile.
The position should be like Article Bottom Ad (whice i already use), so i need to add another ad code to Custom Ad 1. But how can i use that code? Via short code? And if so, what short code do i need to use?
Thanks!
Hi,
Yes you can paste your code in a custom ad from Theme Panel and use do_shortcode function to place it where you want to be displayed in the post template: http://screencast.com/t/52UuLXpU
<?php echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]'); ?>
Result: http://screencast.com/t/xnUxbaEV7552
Thanks!
-
This reply was modified 11 years by
Alin [tagDiv].
Thanks. I did that and i worked, but if i insert the custom ad via shortcode, the ‘disable on desktop’ button does not work. and he mobile ad is showing on desktop as well.
How can i fix that?
Thanks
Hi,
Our ad system was designed to work with adsense code, if you don’t use adsense code you will have to use these divs to display your banner – https://forum.tagdiv.com/ads/ as the ad options to disable and size work only with adsense code.
So if want your banner to be visible only on mobiles you can try to use this div:
<div class="td-visible-phone">
your code
</div>
Thanks!
-
This reply was modified 11 years by
Alin [tagDiv].
Hi,
You could try to add custom ad shortcode in header style 1 – http://screencast.com/t/CUKw2baz and enable header ad only for mobile and also disable custom ad for mobile. You may need some css customizations but you can try and see if it works.
Thanks!