Wordpress plug-in solution to Google fonts!

Source: Internet
Author: User
Tags aliyun google google + google+ hosting how to html http

Intermediary trading http://www.aliyun.com/zixun/aggregation/6858.html"> SEO diagnostic Taobao customer hosting technology hall

As a wordpress disabled google fonts method before, the method is to use the installation plugin!

As more background plug-ins cause the site to open slowly, then we can plug-ins try not to use.

This article Huang Kun teach you how to solve the Google font open slowly without plug-ins.

1. First we find the functions.php file for your site's theme, inside the wp-content \ themes \ your theme's name \ folder

Open the functions.php, we will see the first line of the home page

3. We only need the first line of code in the homepage

// Disable Open Sans
class Disable_Google_Fonts {
public function __construct () {
add_filter ('gettext_with_context', array ($ this, 'disable_open_sans'), 888, 4);
}
public function disable_open_sans ($ translations, $ text, $ context, $ domain) {
if ('Open Sans font: on or off' == $ context && 'on' == $ text) {
$ translations = 'off';
}
return
}
}
$ disable_google_fonts = new Disable_Google_Fonts;

As shown:

Wordpress Google font can solve the problem!

This article by the Huang Kun 2507.html "> webmaster blog editor reprint, please indicate the source: http://www.jmdrkj.cn/92.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.