Viewing 12 replies - 16 through 27 (of 27 total)
  • Well I’ve fixed this issue myself. AMP pages will not show ads with the normal ad code. So if you have any existing shortcode of function that you use to push ads within your content, put a check in there like this:

    if ( is_amp_endpoint() ) {
    .....
    }

    and then use the adsense ad code the way @crischo has mentioned above

    <div class="some-class">
    <amp-ad width="auto" height="250"
            type="adsense"
            data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
            data-ad-slot="xxxxxxxxxxxxxx">
        </amp-ad>
      </div>

    Hope this helps….

    I use this code:

    <div class=”ad-container”>
    <amp-ad width=”728″ height=”90″
    type=”adsense”
    data-ad-client=”ca-pub-xxxxxxxxxx”
    data-ad-slot=”xxxxxxxxxx”>
    </amp-ad>
    </div>

    Here is the sample: Ehliyet S?nav Sonu?lar?

    Favicon + Author + Youtube Videos + ?mages + Adsense

    I think it’s because you are trying to fetch out wide ad. Please note amp is only for mobile and wide ads no way make sense for mobile. Try using 300×250

    You should try out this plugin, it’s awesome and allows for the addition of analytics and ads:

    https://www.ads-software.com/plugins/pagefrog/

    hello,

    if i use the Code, Facebook Instant Articles warns me, that this is not good.

    But why can i put the Ad-Code in the settings of this plugin and only shows in amp postings?

    Is that possible? That would be great.

    Sorry, for my bad english ??

    Thanks
    Sebastian

    I’m using the Custom AMP plugin in addition to the official one – it includes a lot of extras like featured images, related posts, and Adsense in the footer. All of it validates, per Google Webmaster Tools (I didn’t try adding a menu so not sure that would work).

    Here’s the plugin url:
    https://www.ads-software.com/plugins/custom-amp-accelerated-mobile-pages/

    I use width and height in CSS? Excuse the grammar, I do not speak English.

    I am trying to use Adsense code to show on AMP pages, but it only shows empty spaces…

    Using:

    <amp-ad width=”auto” height=”250″
    type=”adsense”
    data-ad-client=”ca-pub-xxx”
    data-ad-slot=”xxx”>
    </amp-ad>

    One of the AMP plugins recently added Google Adsense support with options at https://www.ads-software.com/plugins/accelerated-mobile-pages/

    This code works perfectly

    <div class=”ad-container”>
    <amp-ad width=”auto” height=”250″
    type=”adsense”
    data-ad-client=”ca-pub-xxxxxxxxxxxxxxx”
    data-ad-slot=”xxxxxxxxxxxxxx”>
    </amp-ad>
    </div>

    see here
    https://applyipo.com/blog/2016/08/19/rbl-bank-ipo-allotment-status-ratnakar-bank-allotment/amp

    Hi,

    it would be great, if ads would be supported and we can put ads inside the posts.

    Could we expect these in one of the next updates?

    Sebastian

    Ads are supported; but not everybody serves ads in the same way.

    So, you need to learn to use the working methods such as the filter added to your functions file to enable the kind of ads you serve; either adsense using example provided above, or shortcode to an ad rotator plugin, etc.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Google Ads Don't Show Up On AMP Pages’ is closed to new replies.