LiteSpeed Cache and AMP not working together correctly

LiteSpeed Cache and AMP not working together correctly, here is a link for screenshots: 

1.

Add the following code to your theme’s functions.php:

function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() && ! defined( 'LITESPEED_NO_LAZY' ) && define( 'LITESPEED_NO_LAZY', true ) ;

Purge the cache. This will disable Lazy Load on all AMP pages.

In some theme , if that code doesn’t work when inserted in theme’s functions.php, you can also insert it into /wp-content/plugins/amp/includes/class-amp-theme-support.php

2.

all the other conflicting optimizations can be disabled in:
Admin > LiteSpeed Cache > Tuning > URI Excludes > /?amp amp  /amp/ ^/amp/

3.

4.

5.

Disable seo plugins. Or others

6.

Add plugin: https://gist.github.com/westonruter/e588bd4ed1778799b19417c838eb5e5e

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *