Trouble adding new google font
-
I’m trying to make use of the chaplin theme with a specific font from Google Fonts (Alata).
So far I’ve enqueued the font from my child functions.php using:
add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' ); function custom_add_google_fonts() { wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family=Alata&display=swap', false ); };
Unfortunately, when I add a simple line to my child style.css to change the body text it refuses to override the parent.
body{ font-family: 'Alata', sans-serif; }
Using the below works but I’d rather keep the parent theme in control, i.e. select the font from ‘Fonts’ section in the customise menu, which states “Chaplin supports all fonts on Google Fonts…”. Perhaps this isn’t possible?!?
* { font-family: 'Alata', sans-serif; }
I think it’s inheriting the theme font from elsewhere but it’s a little beyond me at this stage to determine exactly whats going on.
Any help would be greatly appreciated.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Trouble adding new google font’ is closed to new replies.