Php 如何在wordpress中设置多个Web字体?

Php 如何在wordpress中设置多个Web字体?,php,wordpress,load,webfonts,Php,Wordpress,Load,Webfonts,我下载了一些空白的wordpress主题文件,并开始用自己的php、html和css填充它们。 我使用以下代码创建了google webfont: function load_fonts() { wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Tauri'); wp_enqueue_style( 'googleFonts');

我下载了一些空白的wordpress主题文件,并开始用自己的php、html和css填充它们。 我使用以下代码创建了google webfont:

    function load_fonts() {
            wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Tauri');
            wp_enqueue_style( 'googleFonts');
        }

 add_action('wp_print_styles', 'load_fonts'); 
但我想添加另一个webfont。我尝试了两件事:

1:使用“,”将其添加到wp_register_样式中

function load_fonts() {
            wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Tauri','http://fonts.googleapis.com/css?family=Muli');
            wp_enqueue_style( 'googleFonts');
        }

 add_action('wp_print_styles', 'load_fonts'); 
2:重复:

    function load_fonts2() {
            wp_register_style('googleFonts2', 'http://fonts.googleapis.com/css?family=Muli');
            wp_enqueue_style( 'googleFonts2');
        }

 add_action('wp_print_styles', 'load_fonts2'); 
不幸的是,这两种方法都不起作用。有人能告诉我为什么上面的方法不起作用吗, 以及如何添加多种网络字体。 提前谢谢你

从webfonts API请求多个族时,请使用
|
管道分隔符

-Cntrl+F
多个

从webfonts API请求多个族时,请使用
|
管道分隔符

-Cntrl+F
多个

wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Tauri|Muli');