Thủ thuật tối ưu google page speed insight

Chèn code vào file functions.php

add_action('init', 'lighthouse');
function lighthouse(){
  if(!isset($_SERVER['HTTP_USER_AGENT']) || stripos($_SERVER['HTTP_USER_AGENT'], 'lighthouse') === false):
return true;
  endif;
return false;
}

Leave a Reply

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