添加谷歌字体到Wordpress和管理标题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了添加谷歌字体到Wordpress和管理标题相关的知识,希望对你有一定的参考价值。
Add Google Lato Font link from Google Fonts to your website. It will add to your admin area also.
function projectname_font_url() { $font_url = ''; /* * Translators: If there are characters in your language that are not supported * by Lato, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Lato font: on or off', 'projectname' ) ) { $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); } return $font_url; } function projectname_scripts() { } add_action( 'wp_enqueue_scripts', 'projectname_scripts' ); function projectname_admin_fonts() { } add_action( 'admin_print_scripts-appearance_page_custom-header', 'projectname_admin_fonts' );
以上是关于添加谷歌字体到Wordpress和管理标题的主要内容,如果未能解决你的问题,请参考以下文章
谷歌标签管理器在 wordpress 网站上导致 javascript 错误