Adding google fonts to WordPress theme
I am trying to add google fonts to a custom WordPress theme. Therefore I tried to enqueue selected three font faces at once to make it fast loading. So, I use the below codes to register and enqueue the same.
wp_register_style('googlFonts', '//fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700family=DM+Serif+Displayfamily=La+Belle+Auroredisplay=swap');
wp_enqueue_style('googlFonts');
When I search via source code I can only see the last font. Other fonts are not loading. Even I can't see the same complete URL in the source code. Below is what I saw from the source code.
Can anybody help me with this?
Thanks in advance
Topic fonts autoloading wp-enqueue-style wp-enqueue-script theme-development Wordpress
Category Web