Hey @assakour
Our plugin Advanced AMP Ads automatically adds those scripts. you need not add manually.
Let me know if you have any questions.
Thread Starter
Med
(@assakour)
I will just add the code below in Custoum Advertiment?
<amp-ad
layout=”responsive”
width=300
height=250
type=”adsense”
data-ad-client=”ca-pub-1234567891234567″
data-ad-slot=”1234567890″>
</amp-ad>
Hi ampforwp,
Is there a way to place the AMP ad code in specific locations on some special pages?
Hey @assakour
Yes, you can place that Ad code in Custom Advertisement without any issues. Don’t forget to replace data-ad-client and data-ad-slot with your own data-ad-client and data-ad-slot.
and @considerthis1
If you want to place Custom Ads in Specific Locations in special pages, you can use Custom AMP Editor. In custom AMP Editor, simply place AMP Ad code, it will appear only in AMP.
Hope it helps.
Let me know if you have any questions.
Hi AMPforWP,
I don’t really understand how I can place the Custom code.
Google does not allow changing its ad code, which looks like this:
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– AMP Custom Placement 300 x 250 –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:300px;height:250px”
data-ad-client=”ca-pub-123456789″
data-ad-slot=”123456789″>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Thread Starter
Med
(@assakour)
Hi Mohamed,
Gosh, Thank YOU !!!
I had not seen that Google article before.
I’m reading the article on creating an AMP ad and reading it again. I’m so slow to understand… I don’t quite know how the “ad slot” works, since it would be from an ad I’m not really going to use… right? I mean, I just created the ad in order to
…
I’m so totally confused.
I think I’ll go try it. Maybe I don’t need to understand… just Do. 🙂
Okay, so the ad shows up on my desktop… and on any device because it’s an AMP ad. But… it is not showing in my AMP page. 🙁
Darn it, I wrote that wrong.
The ad I created using the Google instructions you posted shows up an all devices, but only because it’s a RESPONSIVE ad.
It does not show up when I got to MobileTest.me
I’ll try putting the ad into my page another way, in case the way it’s added has an effect.
AMPforWP
No, it doesn’t work. … For me.
AMP for WP…
YIKES, I really do not understand the Custom AMP Editor… either…
How can I make the AMP ad appear in the Exact location I want it to appear in a special page?
@considerthis1
What I did for that is use the plugin “Widget shortcode”
Then in the “arbitrary” sidebar it creates, place the AMP ad code in a text widget
It will give you a shortcode like [widget id=”text-45″]
Now place this shortcode wherever you want your ad to appear