^ 回到顶部
  • 人生没有定律,每个人都有自己的节奏
  • 本站wordpress建站教程均通过实践后发布,希望对你有帮助,如果有代码出错,请联系站长解决
  • 希望你的坚持,都是因为热爱,而不是因为不甘心
  • 8年wordpress建站经验,5星服务品质
  • 那些不愿意让你吃亏的人,才是真正值得你深交的人,也是值得你付出时间的人
  • 腾讯云3年2核2G新品轻量限时特惠只需408元

WordPress网站访问慢怎么办

其实网上有很多有效的办法,主要是字体的原因。有的用插件,有的用代码,有的主题已经集成了该功能,陌小雨每重新安装一个主题就会将下面的代码粘贴到主题的 functions.php 中,希望可以帮到一些 wordpress 新手。

/* 
 * delete google fonts by 陌小雨
*/
// Remove Open Sans that WP adds from frontend
if (!function_exists('remove_wp_open_sans')) :
    function remove_wp_open_sans() {
        wp_deregister_style( 'open-sans' );
        wp_register_style( 'open-sans', false );
    }
    add_action('wp_enqueue_scripts', 'remove_wp_open_sans');
    // Uncomment below to remove from admin
    // add_action('admin_enqueue_scripts', 'remove_wp_open_sans');
endif;
function remove_open_sans() {    
    wp_deregister_style( 'open-sans' );
    wp_register_style( 'open-sans', false ); 
    wp_enqueue_style('open-sans',''); 
} 
add_action( 'init', 'remove_open_sans' );

这样子,以后看到谁反应这个问题,陌小雨就可以把这篇文章的地址直接拿出来啦!

2 核 2G 限时特惠 396 元/3 年    宝塔建站 10850 大礼包

赠人玫瑰,手有余香。