Google Fonts not always working
-
I’m using the Zoom Lite theme but want to use some other fonts – in particular Bitter – for the site title and so on.
I’ve created a child theme, enqueued the fonts in my functions.php using:
wp_enqueue_style('pumpkin-google-fonts', 'https://fonts.googleapis.com/css?family=Bitter|Georgia|Source%20Sans%20Pro', false);(and then add_action).
I then specify in my site title and header CSS {in style.css) to use that family, for example:
h1, h2, h3, h4, h5, h6 { font-family: "Bitter"; }But nothing works, and the site still doesn’t use the font. I’ve tried adding !important to the style attribute and a load of other things, but nothing works. I even installed TK Google Fonts plugin to see if that would solve it. But no joy. I’ve cleared the cache, server and client side, to no effect.
The weird thing is that a couple of times the font did show correctly. It worked for an hour or so, then reverted. But most of the time, it’s wrong.
Any ideas what’s going on, and how to fix? I’m wondering if there’s some sort of race condition and the font is loading too late to render the text, but that seems unlikely. I’m not sure how to proceed…
The page I need help with: [log in to see the link]
The topic ‘Google Fonts not always working’ is closed to new replies.