/ Published in: PHP

Add Google Lato Font link from Google Fonts to your website. It will add to your admin area also.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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' );
Comments
