Reputation: 6322
My WordPress site is giving AMP error and need some help to fix it. I am using "AMP Plugin" for creating AMP pages. I am also using "WP-Syntax Plugin" to highlight the code syntax.
The problem is that the AMP plugin is not putting the sample codes of the articles correctly in amp pages. For example when converting the article What is Bootstrap - here to amp version here, it includes the sample codes in the amp version due to which google shows amp errors in that page.
If you see the sample code under the text ("Now reference the “bootstrap.css” in page head (before your site’s CSS files).)" under non-amp page and compare compare it with the amp version, you will see that the code is not given as a text but is rendered.
This creates a big problem. Can anybody has a solution to this? Thanks.
Upvotes: 0
Views: 260
Reputation: 31
This is because Amp is basically the strip down version or bare html version of html. Plugins are not supported.
One thing you can do is using a div for the code and give it a class name. And then add a custom css for the amp pages. In this way you will be able to atleast highlight the code are from other paragraphs.
Upvotes: 0