A
A
Andrey Filimonov2017-03-22 16:31:24
css
Andrey Filimonov, 2017-03-22 16:31:24

How to connect a second font with minimal load?

Hello, in my wordpress theme I connected one font in functions:

function load_fonts() 
{             
wp_register_style('et-googleFonts', 
'https://fonts.googleapis.com/css?family=Roboto:100,900&subset=cyrillic,cyrillic-ext');             wp_enqueue_style( 'et-googleFonts');         
}     
add_action('wp_print_styles', 'load_fonts');

I like the font, but it's bad for articles, too thin to read. I think to connect the second one, but what Google fonts shows, what they say on the Internet, additionally connected fonts greatly affect the page loading speed. Can you please tell me how to connect the font with minimal load on the site? Can I create a separate php header just for posts and load the font from google fonts there? here is the site if needed

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2017-03-22
@webinar

The 2nd font is usually not critical. I think wp will affect the download speed more than the second font.
And really freeze. What is the problem? Yes, and the idea to take out the font only where it is needed is sound.

E
Eugene, 2017-03-23
@Eugeny1987

Fonts from Google can be loaded several at once

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question