The inline 'style' attribute is not allowed in AMP documents. Use 'style amp-cus

Posted in: Newsmag
Post count: 8

Hi,

I’m getting notifications from Google about AMP,
so I’ve temporarily deactivated it. How do I fix this?

Thanks,
Larry Cockerham

Post count: 9544

Depends on the style element. If you have old inline styles like a center style on paragraph tag, you will need to search and replace that and replace with css class using phpmyadmin on your mysql dbase.

If its a theme style, try to find out where that is to let the theme devs know.

You should test any of your pists reported as having errors with goigkes amp tester to see what the errors are to fix.

Post count: 20685

Hi,

What kind of notifications were received? If you should decide to activate it again and there is still a problem detected, provide a link to your website so we can take a look with the AMP validator.

At the moment there would be no know issues with our AMP plugin, usually problems are caused by the post content as Chris suggested, in many cases also ads used that are not for AMP.

Thanks

Post count: 8

Here were the two Google showed in their search console:

Error:
The inline ‘style’ attribute is not allowed in AMP documents. Use ‘style amp-custom’ tag instead
Warning:
Error in required structured data element

These were mostly associated with the demo posts. If I delete these maybe that will fix the problem.

Thanks,
Larry

Post count: 20685

Hi,

Let us know if there are still problems in this matter, we will take a look.

Thanks

Post count: 6

I have the same problem. Google console says it’s in all articles at this line:

<div class="td-social-but-icon"><i class="td-icon-plus td-social-expand-tabs-icon"></i></div> </a>

The inline ‘style’ attribute is not allowed in AMP documents. Use ‘style amp-custom’ tag instead.

  • This reply was modified 8 years by mmedia.
  • This reply was modified 8 years by mmedia.
  • This reply was modified 8 years by mmedia.
Post count: 20685

Hi,


@mmedia
If you could provide a link to a post where the error is signaled, i will test with the validator and see what is the problem exactly.

Post count: 8

Hi, I deleted all of the amp posts, but here is a link to Google’s original
page with all of the articles and documentation of the problem:
https://search.google.com/search-console/amp/drilldown?resource_id=https%3A%2F%2Fultimatemarketing.co%2F&item_key=GgYIBBADGFE&hl=en&sharing_key=MNOSLUS1auOM0eZOxPWlMQ

If this doesn’t work, I’ll send you a screen capture. I’ve deactivated the AMP plugin, but now that I’ve deleted the demo posts, everything may be okay. It may be the Google ads need adjusting. If you click on one of the post links, it highlights the Google ad that is self-adjusting. Maybe this needs changing.

Larry

  • This reply was modified 8 years by nexxus396647247. Reason: Additional information
Post count: 20685

Hi,


@nexxus396647247
It works just fine, from what I can see most if not all of the issues are related to the ads. Note that AMP requires special ads
https://support.google.com/adsense/answer/7183212?hl=en

Then these ads have to be entered in the theme panel like so
https://www.screencast.com/t/n8D00gbPx9

Post count: 6

How can I pm?

Post count: 8

Hi Simon,

I see what you mean, but could you fix the one below so I could
see an example and place them in the custom AMP panel? They all are
responsive ads.

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– UlltimateMarketing –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-6785415464346390″
data-ad-slot=”6645016827″
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Thanks,
Larry Cockerham

Post count: 21

U would only need to replace data-ad-client and data-ad-slot with your own values in the theme panel >> amp tab i think

  • This reply was modified 8 years by Danny.
  • This reply was modified 8 years by Danny.
Post count: 20685

You only need to enter the required values, not the whole ad code
https://www.screencast.com/t/fM7Gh5X3
Be sure to select Google Adsense as the ad type. Then be sure to test on a mobile device or mobile emulator to actually see the ads displayed.

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