Wordpress SEO - What are you looking for?

If you're looking for answers to SEO or wordpress related questions, type in a phrase and wait for hints or click enter! The results also show links to external sources.

161 articles in the database

How to use Google fonts on the website?

[ Article content is protected by Plagiashield ]


If you run a blog, you're sure to use various tricks to format your posts so that they w best the way they reached readers. However, the choice of colors, bold and emphasis and adding spacing may have no effect if you have chosen the wrong font for the text content.

Google Fonts

Today we're going to show you a simple way that, without the help of plugs lets you connect stylish fonts Googlethat will work for everyone users regardless of which web browser you choose.
I'm sure you've already heard about Google fonts. Information about them is often found in the descriptions of themethat the corresponding template supports web fonts Google. When you are a beginner you have surely wondered what Google fonts really is? It is a collection of fonts designed for any use. They have open source licenseAs a result, we can use them on websites or in graphic design without any reservations. Another advantage of the Google service is the wide selection of fonts, including those with Polish typos, and their support via All popular web browsers.

1. Website Google Fonts

Let's say we were interested in the Raleway font. We can use it without any additional customization. However, Google allows us to set different thickness versions. For example, we will choose the meaning of medium 500 (Figure 2).

2. setting the thickness for the font

Now we can go to the section Emded and copy the link to the selected font. This is https://fonts.googleapis.com/css?family=Raleway:500.

Therefore to add the above code to pagesThe following code should be inserted into the functions file of the theme used by default:

// Plugging in Google fonts
function wph_add_google_fonts() {
    if ( !is_admin() ) {
        wp_register_style('google-raleway', 'https://fonts.googleapis.com/css?family=Raleway:500', array(), null, 'all')
        wp_enqueue_style('google- raleway');
add_action('wp_enqueue_scripts', 'wph_add_google_fonts');

Where The wp_register_style is a function to register styles and the wp_enqueue_style is a function to za merging of styles.

So we'll go to the file functions.php. We will use the standard editor in section Appearance (Figure 3).

Edit the functions.php file

At the end of this file we will insert the above code and save the changes.

Now we can go into the entry and use the Raleway font. So use the tag: Content. In our case, the sample entry looks like this (Figures 4, 5):

4. paragraph highlighting with Raleway font

5. paragraph highlighting with Raleway font

Like can be seen from Figures 4 and 5, we applied the Raleway font to the second paragraph. The corresponding piece of text now stands out from the rest. So the solution given works correctly.

If you want to connect other fonts, such as Open Sans and Roboto, add additional lines to the function wph_add_google_fonts():

wp_register_style('google-open-sans', 'https://fonts.googleapis.com/css?family=Open+Sans', array(), null, 'all');
wp_register_style('google-roboto', 'https://fonts.googleapis.com/css?family=Roboto', array(), null, 'all');

Following the analogy, you can add any other fonts from Google's service.


With today's solution you will be able to add interesting fonts on blog and use them for different text contents. Number fonts on Google is growing rapidly, so you're sure to find co¶ interesting for yourself. And what is the most important, you do not have to use any additional plugins. Just add a font once and continue using it on website.

Please note that it is best to save changes to the file functions.php in a posterior motif. Then after the renewal templates you won't lose them.


O Janusz Kaminski

Company marketing specialist TemplateMonster. He has been working in the IT industry for 5 years. He has experience in SEO, internet marketing. Apart from that he is interested in web designing.
  • Internal Links and Sematics

  • Link building
  • Sematics
  • Link building has never been easier. Hundreds of link possibilities in one click.
  • See

[ Article content is protected by Plagiashield ]

SEMRush - the best tool for SEO and PPC.

Read previous post:
Tips for optimizing images in WordPress

Site speed has recently become increasingly important in the topic of search engine optimization and SEO. Google itself has officially confirmed...