amp-wp icon indicating copy to clipboard operation
amp-wp copied to clipboard

How to insert advertising in the middle of an article

Open alessandromoretti90 opened this issue 10 years ago • 2 comments

Hi, how we can insert advertising in the midst of an article?

We have now entered a code like this that I am attaching below in the file single.php.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- OverPress Reattiva -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-2943502232807001"
     data-ad-slot="6611099574"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

alessandromoretti90 avatar Feb 24 '16 22:02 alessandromoretti90

Check this. http://dfp-amp-testing-1185.appspot.com/ i have implemented this. It works for me.

sushant0077 avatar Aug 02 '16 05:08 sushant0077

See https://github.com/Automattic/amp-wp#custom-sanitizer for building a custom sanitizer to inject ads.

mjangda avatar Aug 18 '16 19:08 mjangda