Fix for Autoptimize "Aggregate CSS-files" Breaking AMP

Posted in: Newspaper
Post count: 22

For those of you using AO and seeing the following amp error from Google:
The mandatory tag \'head > style[amp-boilerplate]\' is missing or incorrect.

A simple fix is to edit:
/wp-content/themes/Newspaper/mobile/header-amp.php

Replace:
<html <?php language_attributes(); ?>>

With:
<html <?php language_attributes(); ?> amp>

Post count: 22421

Thank you for posting this solution. I;m sure it will hep lots of users that struggle with the same problem. 🙂

Post count: 14

will this work with newsmag theme

Post count: 35449

Hi,

Yes, that should work! but depend on what issue you have.

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.