• I want to add a new custom font pair to the customizr theme (one font-family for headings/titles and other one is for body/text). How a pair of fonts is embedded in wordpress? I know the method for a single font, but what about a font pair in ‘customizr’ way?
    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • If I have understood correctly you want to add more than one google font to your CSS. Choose your desired fonts at https://fonts.google.com/ and copy @import option

    Then put this at the top of your CSS file
    @import url('https://fonts.googleapis.com/css?family=Lato|Open+Sans');

    I have chosen Lato and Open Sans as an example, yours may differ according to fonts you choose.

    Then for h1 you do this:

    h1 {font-family: 'Lato', sans-serif;}
    Or
    h1{ font-family: 'Open Sans', sans-serif;}

    Note family=Lato|Open+Sans in @import. Font names having multiple words are URL encoded. Like here I have used Open Sans but in @import it is Open+Sans. But inside the CSS rule you write ‘Open Sans’, no URL is required here.

    Let me know if this helps.

    Thread Starter Yanur Islam Piash

    (@yipiash)

    Thanks Subrata! Tell me if I am wrong. For the titles and headings I should write:

    .site-title, .site-description, h1, h2, h3, .tc-dropcap {
        font-family: Raleway, sans-serif;
    } 

    and for the rest,

    
    body {
        font-family: Roboto;
    }

    Yes, just use a quote for Google fonts like:

    
    .site-title, .site-description, h1, h2, h3, .tc-dropcap {
        font-family: 'Raleway', sans-serif;
    }
    
    body {
        font-family: 'Roboto';
    }
    
    Thread Starter Yanur Islam Piash

    (@yipiash)

    Thank you so much ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add a Custom Google font pair’ is closed to new replies.