🚀🚀🚀 Speed up services site for site members free for BABIATO members -Increase site speed 🚀🚀🚀

scillione

Active member
May 11, 2019
91
141
33
@scillione can you just explain the best way to use the fonts on wordpress & elementor. how to disable the google fonts using by elementor?

thanks


On functions.php add the following

add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );

then save.

Use CSS @import Rule for the fonts.

Go to Google fonts and select the style you like.

scrnli_4_15_2020_4-38-15 PM.png


You only need this

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap');

and

font-family: 'Open Sans', sans-serif;


Now, you can add it on elementor header or footer in Custom CSS.

on elementor.PNG


Now if you see the example, i have named the HTML Tags that might contain Text inside, example:

h1,h2 {font-family: 'Open Sans', sans-serif; } this means, H1 and H2 tags are Open sans font style.

In order to have effect, you need to also make sure any text, have the font family value to " Default " and also the corresponding font weight and the proper HTML tag. like this:

follow.PNG

Heading with H1 Tag

corrsponding.PNG

What you achieve?

Less server request and smaller in size page and only load the fonts and style you need.
also, if need be, you could change the fonts from your entire site, just by changing the CSS.
 
Last edited:

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu