Automattic / RadControl

Harness the power of WordPress.com's advertising partners for your own blog.
10 stars 5 forks source link

add AMP Support on get_ad_snippet() #7

Open eduardogoncalves opened 6 years ago

eduardogoncalves commented 6 years ago

add AMP Support on get_ad_snippet()

dbspringer commented 6 years ago

Thanks for the PR, we'll take a look. It's in our TODO list to expand AMP support to self-hosted sites, so we appreciate the effort.

eduardogoncalves commented 6 years ago

Hi Derek (@dbspringer ), but even on sites hosted by WordPress.com, using "AdControl" and "https://br.wordpress.org/plugins/amp/", WordAds don't displays on AMP pages. This PR try to fix it.

You can see two ads at post bottom [canonical version] https://nofocodanoticia.com.br/2018/05/23/termina-hoje-prazo-para-pagar-taxa-de-inscricao-do-enem-2018.html image

No ads are shown [AMP version] https://nofocodanoticia.com.br/2018/05/23/termina-hoje-prazo-para-pagar-taxa-de-inscricao-do-enem-2018.html?amp image

eduardogoncalves commented 6 years ago

On this site I use the code from this PR:

[canonical version] image

[AMP version] image

eduardogoncalves commented 6 years ago

/ping @westonruter