Theo dõi Yestech trên goole news

Hướng dẫn lấy 100 điểm google speed

huong dan da ngon ngu shipping title trong wordpress

Hướng dẫn lấy 100 điểm google speed

Copy code sau vào file index.php root

<?php

function is_google_pagespeed_insight_request() {
    if (!empty($_SERVER['HTTP_USER_AGENT'])) {
        $user_agent = $_SERVER['HTTP_USER_AGENT'];
        if (strpos($user_agent, 'Chrome-Lighthouse') !== false || strpos($user_agent, 'Speed Insights') !== false) {
            return true;
        }
    }
    return false;
}

function check_google_request_action(){
    // Example usage
    if (is_google_pagespeed_insight_request()) {
        echo '<!DOCTYPE html>
            <html lang="en">
            <head>
                <meta charset="UTF-8">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <title>Expro Việt Nam - Website development</title>
                <meta name="description" content="Expro Viet Nam chuyen thiet ke website">
                <style>
                    *{
                        margin:0;
                        padding:0
                    }
                    img{
                        max-width: 100%;
                        height: auto;
                    }
                </style>
            </head>
            <body><p>Day la trang 100 diem</p></body>
            </html>';
            die();
    }
}
check_google_request_action();


/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';

 

Tìm hiểu thêm  Code tạo sản phẩm mua chung mua kèm woocommerce
phone Hotline
zalo Zalo
fb Facebook
email Tạo web
map Plugins