How to add google fonts to wordpress

  • Find right font

Access google fonts @ You can browse or search to find the required font at this website.

  • Select the customisation as per your requirements.

Lets suppose you selected a font called “Crimson Text”. Click on “select this font” and it will open following window. please select the customisation required.

This will create a url, copy this url


  • Enqueueing google fonts in wordpress

Use the url copied in previous step and copy in into functions file with following code.

As you can see in below code, multiple fonts can be copied as below. In below function “Poppins” and “Crimson” is copied

function startwordpress_google_fonts() {
wp_register_style('Poppins', ',400,500,600,700');
wp_enqueue_style( 'Poppins');
wp_register_style('Crimson', ',400i,600,600i,700');
wp_enqueue_style( 'Crimson'); 

add_action('wp_print_styles', 'startwordpress_google_fonts');


And you are all set. You can use this font in your world press CSS with the name that you have provided while registering this font. Normally you the same name while registering the font name to avoid the confusion.


Leave a Reply

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