Last active
January 10, 2018 14:39
-
-
Save MikeNGarrett/8462474 to your computer and use it in GitHub Desktop.
WordPress 3.8 - replace admin Open Sans font with your own version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replace_open_sans() { | |
// Kill the original style | |
wp_deregister_style('open-sans'); | |
// Replace it with your own (just as an example, I included only the 300 weight) | |
wp_register_style( 'open-sans', 'http://fonts.googleapis.com/css?family=Open+Sans:300' ); | |
wp_enqueue_style( 'open-sans'); | |
} | |
add_action( 'wp_enqueue_scripts', 'replace_open_sans' ); | |
// Thanks to @timkinnane | |
add_action( 'admin_enqueue_scripts', 'replace_open_sans' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this!
I found I needed to use the following to replace it in dashboard AND the admin bar.