• Hello

    I have been looking into a couple of methods for changing the font in my blog post titles but couldn’t find the CSS stylesheet in Twenty Eleven. I then tried doing this by adding a plugin but couldn’t get this to work either. I have found the CSS code that I need from Google Fonts but not sure the best way to go about changing the font.

    If somebody could please tell me how to find the correct area of the style sheet to edit (and where to place the new font code) I would be very grateful.

    Thanks in advance for any help.

    Thank you

    Gemma

Viewing 4 replies - 1 through 4 (of 4 total)
  • You definitely don’t want to edit any of the theme files directly, either a create a child theme or use plugins.

    When you say you want to change the font, I assume you want to change the font-family and not some characteristic of the font, like the size or color. If you want to use a Google font, there are a couple of things you need to do:

    1. Add a link to the font stylesheet in the head section of your site. This would look something like this:
      <link href='https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,200' rel='stylesheet' type='text/css'>

      In this example, I’m using a Google font called Yanone Kaffeesatz, at 400 & 200 weights. Google fonts will show you what link to use once you create your collection of fonts. To get the link into head section of your site, you can use a plugin called Header and Footer. Once you’ve installed and activated the plugin, go to Settings → Header and Footer and paste your own stylesheet link into the field labeled Code to be added on HEAD section of every page. The link will have all the information the browser needs to download & display the font correctly.

    2. The second thing you need to do is add a CSS rule to change the entry titles to your new font family:
      .entry-title {
         font-family: 'Yanone Kaffeesatz','sans-serif';
      }

      You can do this through a CSS plugin like JetPack or Custom CSS Manager.

    Thread Starter Gemma100

    (@gemma100)

    Thanks so much for your help CrouchingBruin, that really clarifies things. I will have a shot at that asap. Hopefully can get it right first time. Brilliant! Thanks again!

    OK, if you’re having problems, post a link to your site and I’ll have a look.

    Thread Starter Gemma100

    (@gemma100)

    Hi again CrouchingBruin. Success! Got it to work first time, thanks very much for your comprehensive help, I couldn’t have done it without you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change font in post titles’ is closed to new replies.