Change font of title and headers

You can either specify the font as font-family: Economica, sans-serif or add other fallbacks in between, like font-family: Economica,“Trebuchet MS”,Arial,Sans-Serif;. Depends on how specific you want to be with fallbacks.

Add that same font-family statement for the other style you want to change. Add or change the font-size statement as you like.

Thanks! I tried this but it wouldnt work with both font-family: Economica, sans-serif; or the below second option

#site-title {
font-family: Economica,“Trebuchet MS”,Arial,Sans-Serif;
font-size: 30px;
font-weight: bold;
line-height: 1;
text-shadow: #222 0 2px 2px;
}

Its not changing the font, reset my cache already to double check.

any other idea?

PS: I have also tried the following:

– added the font using this code in my functions.php

function custom_add_google_fonts() {
 wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css2?family=Economica&display=swap', false );
 }
 add_action( 'wp_enqueue_scripts', 'custom_add_google_fonts' );

– changed the CSS to the following which is displayed on the google font page:

font-family: 'Economica', sans-serif;

Still not working though 🙁

Cheers,
Chris

nevermind, it worked now! maybe just a slight delay but now i can make changes in real time, cheers 🙂

Ah, apologies, I thought you already had the font included.



Source link