Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:cache:lscwp:troubleshooting:lazy_load_amp [2019/02/18 15:27]
qtwrk
litespeed_wiki:cache:lscwp:troubleshooting:lazy_load_amp [2020/05/04 13:52]
Shivam Saluja
Line 1: Line 1:
-===== Lazy Load breaks ​AMP validation ​======+====== Lazy Load Breaks ​AMP Validation ​====== 
 +**Please Note**: This wiki is valid for v2.9.x and below of the LiteSpeed Cache Plugin for WordPress. If you are using v3.0 or above, please see [[https://​docs.litespeedtech.com/​lscache/​lscwp/​overview/​|the new documentation]].
  
-A temporarily solution ​is following code to your theme'​s ''​functions.php'':​+When Lazy Load is enabled in the LiteSpeed Cache plugin for WordPress, it can break AMP validation.  
 + 
 +=====Temporary Solution===== 
 +Add the following code to your theme'​s ''​functions.php'':​
  
 <​code>​function_exists( '​is_amp_endpoint'​ ) && is_amp_endpoint() && ! defined( '​LITESPEED_NO_LAZY'​ ) && define( '​LITESPEED_NO_LAZY',​ true ) ;</​code>​ <​code>​function_exists( '​is_amp_endpoint'​ ) && is_amp_endpoint() && ! defined( '​LITESPEED_NO_LAZY'​ ) && define( '​LITESPEED_NO_LAZY',​ true ) ;</​code>​
  
-And then purge cache, this should ​disable ​lazy load on AMP pages.+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''​
  
-Permanent solution will be integrated into LSCWP v3.0+ , please ​update ​it once when it releases.+=====Permanent ​Solution===== 
 +A permanent ​solution will be integrated into LiteSpeed Cache for WordPress, starting with version 3.0. Please ​update ​to 3.0 once it becomes available.
  
  
  • Admin
  • Last modified: 2020/11/14 16:00
  • by Lisa Clarke