How Can I Wrap AMP Ads with Div Tag On Each Spot

Posted in: Newsmag
Post count: 13

Hello, I want to know if how can I manually add div tag on each Adsense ads shown on AMP pages. I tried editing the backend at plugin > tagdiv composer > mobile > includes > shortcodes > td_block_ad_box_mob.php and added this code and it worked. However, it’s not what I really wanted.

Upon checking the source code, I found that all the amp ads are now wrapped with the same tag, which is not my main goal. I want to wrap each spot of AMP ads with a different tag. One tag for each spot on AMP ads version. I want to know how can I wrap each amp ads with different tags like this.

  • This topic was modified 7 years by limez.
Post count: 23312

Hi,

If you want to use AMP auto ads, please enter the auto ads code like this in the theme panel dedicated section – http://prntscr.com/nztn70 and there should be no problem. No need to do or add anything else, just the ad code as mentioned.
In their documentation, they mention adding a script in the head
https://amp.dev/documentation/components/amp-auto-ads but this is not required, the theme will add it automatically.
If you do not want to use AUto AMp Ads you can add the source ads inside the Mobile Theme Ad files from here -> https://www.screencast.com/t/xSXfTLpBNDB to specify where exactly you want to display your ads.

Thank you!

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