i downloaded blank wordpress-theme files , started filling them own php, html , css. used following code enque 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');
but add webfont. tried 2 things:
1: adding in wp_register_style ','
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: duplicate:
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');
unfortunately both ways didn't work. can tell me why ways above don't work, , how can add multiple webfonts. thank in advance!
wp_register_style('googlefonts', 'http://fonts.googleapis.com/css?family=tauri|muli');
use |
pipe separator when requesting multiple families webfonts api.
documentation - cntrl+f multiple
Comments
Post a Comment