Insert Adzone with php code

Posted in: Newspaper
Post count: 50

Tried to use the shortcode with another plugin to insert the ad zone.
[td_ad_box spot_id=”custom_ad_3″]
That doesnt work.
How do you insert an ad zone via php code? That should work.
Thanks!

Post count: 6600

Hi,

You can add the ad short-code using the do_shortcode() function, like this:

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

Just add this line in your template and the ad code in custom ad box 1 in theme panel > ads.

Thanks

Post count: 50

Thank you.
Maybe a good idea to add this to the documentation.
https://forum.tagdiv.com/ads/

Post count: 6600

We will consider this!
Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.