|

How to insert custom Font from Google Fonts in your css

add google fonts to your WP Theme

A little Bit About Google Fonts and how you can use them on your website. You can visit the web fonts provided from Google Fonts and choose one. For my example i will use the Web font Open Sans. See the Picture below.

How to Add Google Web fonts to Your WordPress Theme

The next steps are to include this web font to your WordPress theme. Follow the style.css file in your FTP WordPress Theme folder and at the top of the your style.css add the lines below:

How to get the right code you can see in the example below

How to add Google fonts to WordPress Theme


/*Add the line below to the top of your style.css file*/

@import url(http://fonts.googleapis.com/css?family=Open+Sans);

And finnaly you need to integrate the font into your style.css file and add this font to any parts of your website.

For Example we can add this font to our H1 tag for specific div class or id in your theme.


h1{

font:lighter 14px/18px 'Open Sans', sans-serif;

}

You can easy add anywhere fonts like this just importing the web font in your style.css

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *