Divi 主題的去掉 google fonts 的方法,加速主題前臺訪問。

正在檢視 1 個帖子:1-1 (共 1 個帖子)
  • 作者
    帖子
  • 詩語
    管理員
    • 文章數量: 5,930
    @feibisi
    樓主

    Divi 主題的去掉 google fonts 的方法,加速主題前臺訪問:

    如果你有一個 functions.php 檔案,根據你的需要新增這個程式碼,或者你想要的部分。我把它分成三部分。

    1 、刪除 open_sans 字型

    // REMOVE OPEN SANS GOOGLE FONT FROM DIVI
    function disable_open_sans_divi() {
    wp_dequeue_style( 'divi-fonts' );
    }
    add_action( 'wp_enqueue_scripts', 'disable_open_sans_divi', 20 );

    2 、刪除 open_sans_monarch 字型

    // REMOVE OPEN SANS GOOGLE FONT FROM MONARCH
    function disable_open_sans_monarch() {
    wp_dequeue_style( 'et-gf-open-sans' );
    }
    add_action( 'wp_enqueue_scripts', 'disable_open_sans_monarch', 20 );

    3 、刪除 divi 全部 google 字型

    // REMOVE ALL DIVI GOOGLE FONTS (Except Open Sans) FROM DIVI
    function et_builder_get_google_fonts() {return array();}
    function et_get_google_fonts() {return array();}
正在檢視 1 個帖子:1-1 (共 1 個帖子)
  • 哎呀,回覆話題必需登入。

話題資訊

  • 當前位於:Divi
  • 0 條回覆
  • 1 個參與人
  • 最後回覆:<a href="https://bbs.weixiaoduo.com/users/feibisi/" title=" 檢視詩語的個人資料" class="bbp-author-link"><span class="bbp-author-name"> 詩語</span></a>
  • 上次活動:<a href="https://bbs.weixiaoduo.com/topic/24107/" title="Divi 主題的去掉 google fonts 的方法,加速主題前臺訪問。">7 年、 3 月前</a>