Remove Open Sans and add custom fonts
-
Just in case anyone else wants to remove Open Sans and add their own typography into the theme.
Add the following in Functions.php:
// remove Open Sans font add_action( 'wp_enqueue_scripts', 'my_deregister_styles', 100 ); function my_deregister_styles() { wp_deregister_style( 'open-sans' ); } // add custom fonts add_action( 'wp_enqueue_scripts','highwind_add_myfonts'); function highwind_add_myfonts() { wp_enqueue_style( 'my-fonts', 'https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Alegreya:700' ); //add your own fonts here. }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Remove Open Sans and add custom fonts’ is closed to new replies.