Return to Snippet

Revision: 80643
at March 23, 2020 17:24 by chrisaiv

Updated URL

Updated Code

Updated Description

Revision: 67412
at September 19, 2014 03:31 by chrisaiv

Initial Code
/** ******** ******** ******** ******** ******** ******** ******** ******** 
* TITLE:        Add Font
* DESCRIPTION: Add Specific Google Font

function add_fonts() {
	// Styles Format:  wp_enqueue_style($handle, $src, $deps, $ver, $media);
        wp_register_style('open-sans', ',300,700', array(), false, 'all');
        wp_enqueue_style( 'open-sans');
add_action('wp_enqueue_scripts', 'add_fonts', 100);

Initial URL

Initial Description
You like a theme but it's referencing a Google font you want to switch out. Here's the simplest way to do it, by keeping the .class names but switching out the Google Font URL

Initial Title
Wordpress: Replace a theme's Google font with your own

Initial Tags

Initial Language