Topics

Create Blogger AMP HTML template install & download Accelerated Mobile Pages themes for Blogspot platform.


Fix AMP Warnings amp-* extension .js script was found on this page but is unused

Fix AMP Warnings amp-* extension .js script was found on this page but is unused
Blogger AMP HTML integrated Blogspot templates are caught off guard with "warnings  amp-* extension .js script was found on this page" or "This may become an error in the future" when checking their AMP blog posts/pages using AMP Project validator tool.

AMP Blogger pages errors & warning is vital & very important in helping your blog posts or pages in search engines, especially with Google search. Making sure these errors or warning are quickly attended to prevents your Blogger AMP pages from being de-indexed or removed from an AMP page results.

FIx AMP warnings errors Blogger AMPHTML Template 2017

Self explained by the AMP validator warnings, it means that some of the available AMP extension .js included in your Blogger AMP pages are not in use & the AMP tags who needs it is not available.

For example, if you are using <amp-twitter/> tag at your Blogger homepage but not at your post pages, then when custom-element='amp-twitter' .js is included, these warnings will occur at your blog post pages upon validation check.

Fixing AMP "amp-* extension .js script was found on this page but is unused" Warnings


Use Blogger conditional tags to target on what Blogger page type your AMP tags/components will be used. Below are some examples adding amp-accordian script/extension on Blogger pages:-

Use amp-* extension .js script at Blogger homepage only.

<b:if cond='data:blog.url == data:blog.canonicalUrl'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Use amp-* extension .js script at Blogger homepage & index pages only.

<b:if cond='data:blog.pageType == &quot;index&quot;'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Use amp-* extension .js script at Blogger post pages only.

<b:if cond='data:blog.pageType == &quot;item&quot;'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Use amp-* extension .js script at Blogger static pages only.

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Use amp-* extension .js script at Blogger error pages only. 

<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Or use the false conditions to include amp-* extensions .js like so:-

Use amp-* extension .js script NOT at Blogger index pages. 

<b:if cond='data:blog.pageType != &quot;index&quot;'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

In addition, you can use new Blogger template expressions introduced by Blogger team. Below are some examples:-

Use amp-* extension .js script at Blogger static & post pages only. 

<b:if cond='data:blog.pageType in {&quot;static_page&quot;,&quot;item&quot;}'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Use amp-* extension .js script at Blogger pages that are not static & post pages

<b:if cond='data:blog.pageType not in {&quot;static_page&quot;,&quot;item&quot;}'>
  <script async='async' custom-element='amp-accordion' src='https://cdn.ampproject.org/v0/amp-accordion-0.1.js'/>
</b:if>

Integrating AMP HTML on Blogger templates or themes can get tricky, but it helps when you know how it is applied with. It gives blog users more control on how their contents is displayed rather than using an external web proxy services to handle their AMP integrated blog post pages where less control is given.

Blogr-AMP Blogger template framework uses a lot of this newer Blogger expressions, tags, conditions & handle the dirty work for you. Which makes conversions from your initial blog template to use valid AMP web pages much more easier & maintain able - for non coders just like you ;)
Blogr-AMP Blogger AMP HTML TemplateRated 5/5 based on 98 reviewsUse new Blogger conditional tags & expressions fix AMP blog page warnings error unused amp-* extension .js was found but is unused to target & load amp-custom elements scripts on blog page pages & display contents quickly.Blogr-AMP: Fix AMP Warnings amp-* extension .js script was found on this page but is unused
5/ 5
Best AMP Blogger template, Blogr-AMP exceeded my expectations. Search engine friendly, easy to use, backed by great support Blogger AMP HTML integrated Blogspot templates are caught off guard with "warnings  amp-* extension .js script was found on this page&q....

Topics You Might Be Interested...


Disqus Comments

Facebook Comments

Working to get connected...

Ooops! We're having trouble connecting. Please refresh your page or contact us...

Code Parser

Have a code snippet to share? Format RAW codes here...

Users who needs to share code snippets in comments, use helper below to paste your codes & copy to comments body.


Working...

Ooops! We're having trouble connecting...