Return to Snippet

Revision: 67364
at September 13, 2014 10:43 by chrisaiv


Initial Code
/** ******** ******** ******** ******** ******** ******** ******** ******** 
* TITLE:       Add Google Font
* DESCRIPTION: Add a Google Font into the header. You might want to look into installing this plug-in instead [Google Typography](https://wordpress.org/plugins/google-typography/). It's way easier to use.
* 
* 
*/

function add_fonts() {
	// Styles Format:  wp_enqueue_style($handle, $src, $deps, $ver, $media);
        wp_register_style('open-sans', 'http://fonts.googleapis.com/css?family=Bree+Serif:400,300,700', array(), false, 'all');
        wp_enqueue_style( 'open-sans');
}
add_action('wp_enqueue_scripts', 'add_fonts', 100);

Initial URL
https://wordpress.org/plugins/google-typography/

Initial Description
You might also consider just installing this Wordpress plug-in. It's way easier https://wordpress.org/plugins/google-typography/

Initial Title
Wordpress: Add A Google Font into the Header

Initial Tags
wordpress

Initial Language
PHP