Problems Changing Font In Twenty Eleven Theme
-
I am trying to change the font of my posts with CSS code but the correct font does not seem to appear. I want to change the font of my posts to the Google font “Lato”, and I plugged in this code:
.entry-content,.entry-summary {
font-size: 13.5px;
line-height: 2.3em;
font-family: ‘Lato’;
letter-spacing: .2px;
color: #7a7a7a;
}However, instead of changing to the Lato font, my font seems to change into a different kind of font. I also tried adding font-family: ‘Lato’!important; but that doesn’t seem to work either.
Any help would be much appreciated.
Here is my blog: http://mabelkwong.com
The blog I need help with is: (visible only to logged in users)
-
Hi there,
you need to add the following CSS rule at the beginning of your stylesheet:
@import url(https://fonts.googleapis.com/css?family=Lato);
Let me know if it worked.
-
Hi themabelkwong
You are able to change your font from the Admin Dashboard without having to use CSS.
Select Appearance > Customize > Fonts – to get to the setting.
Let me know if you need any further help with this.
-
This applies to sites hosted at WordPress.com.
Self hosted sites using WordPress.org are a little different.
This article does a good job of explaining the differences –http://en.support.wordpress.com/com-vs-org/
-
This is the WordPress.com support page about Custom Fonts – https://en.support.wordpress.com/custom-fonts/
-
Thank you mrlubomir and g471n. Both very good solutions.
@import url(https://fonts.googleapis.com/css?family=Lato); worked like a charm. Never knew that bit of code existed, and very glad now that I know. With this code now I can tinker around with changing the font family of the menu and widget bars too.
I also never knew that we could change the fonts directly via the Customise page. Last I checked, I don’t remember so many fonts being available. But they certain are and it’s a win for everyone.
Now to experiment with fonts on my blog and see which one I like best.
- The topic ‘Problems Changing Font In Twenty Eleven Theme’ is closed to new replies.