最近確實google網站打不開了,好不容易打開也搜索不了,不論是香港的、臺灣的還是美國的,放棄吧.
wordpress中使用的有些字體是需要從Google中取出的,這也導致了字體半天取不出,從而wordpress后臺半天打不開,我從網上找了幾種試著還可以的辦法:
第一種:找到wordpress文件夾下的wp-includes,找到script-loader.php,查找fonts.googleapis.com,這是從谷歌服務器獲取字體,修改為fonts.useso.com,保存,OK,查看效果.
第二種:functions.php過濾,在主題中的functions.php文件末尾加上以下代碼之一即可.
1.代碼一
- // 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 );
- }
- // 前臺刪除Google字體CSS
- add_action('wp_enqueue_scripts', 'remove_wp_open_sans');
- // 后臺刪除Google字體CSS ( Uncomment below to remove from admin)
- add_action('admin_enqueue_scripts', 'remove_wp_open_sans');
- endif;
2.代碼二
- 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' );
以下幾種僅供參考,未進行試驗.
第三種:插件過濾
1. 插件一
名稱:Remove Open Sans font Link from WP core
地址:http://wordpress.org/plugins/remove-open-sans-font-from-wp-core/
簡介:Installs ‘Remove Open Sans font Link from WP core’ plugin on your wordpress blog, so it will doesn’t load Open Sans font from Google fonts. 移除WP核心的谷歌字體鏈接.
2. 插件二
名稱:Disable Google Fonts
地址:http://wordpress.org/plugins/disable-google-fonts/
簡介:另一個類似的插件
正常情況下前兩種足以解決問題了,盡量不用插件.
新聞熱點
疑難解答
圖片精選