Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1076132
    Exord B.V.
    Participant

    Hi,

    I would like to use a custom fonts for my headings.

    I put this in my style.css from my child theme, but it doesn’t work:

    @font-face {
    font-family: ‘ThinManGiambattista’;
    font-style: normal;
    font-weight: 300;
    src: local(‘ThinManGiambattista’), local(‘ThinManGiambattista’),
    url(/thegreenhappiness.com/wp-content/themes/x/framework/fonts/ThinManGiambattista.ttf) format(‘truetype’),
    url(/thegreenhappiness.com/wp-content/themes/x/framework/fonts/ThinManGiambattista.woff) format(‘woff’);

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .h1,
    .h2,
    .h3,
    .h4,
    .h5,
    .h6 {
    font-family: ‘ThinManGiambattista’;
    }

    What goes wrong?

    #1076204
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! Please replace your code with this one:

    @font-face {
    font-family: "ThinManGiambattista";
    font-style: normal;
    font-weight: 300;
    src: local("ThinManGiambattista"), local("ThinManGiambattista"),
    url("http://thegreenhappiness.com/wp-content/themes/x/framework/fonts/ThinManGiambattista.ttf") format("truetype"),
    url("http://thegreenhappiness.com/wp-content/themes/x/framework/fonts/ThinManGiambattista.woff") format("woff");
    }
    
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .h1,
    .h2,
    .h3,
    .h4,
    .h5,
    .h6 {
    font-family: "ThinManGiambattista";
    }

    Let us know how this goes!

    #1076214
    Exord B.V.
    Participant

    Thanks for the response!
    Still doesn’t work 🙁

    #1076365
    Joao
    Moderator

    Hi There,

    Are you using a Child Theme?

    If yes could you please try to add the following code in your Child Theme style.css instead of the Customizer:

    
    @font-face {
    font-family: "ThinManGiambattista";
    font-style: normal;
    font-weight: 300;
    src: local("ThinManGiambattista"), local("ThinManGiambattista"),
    url("http://thegreenhappiness.com/wp-content/themes/x/framework/fonts/ThinManGiambattista.ttf") format("truetype"),
    url("http://thegreenhappiness.com/wp-content/themes/x/framework/fonts/ThinManGiambattista.woff") format("woff");
    }

    Let us know how it goes.

    Joao

    #1077630
    Exord B.V.
    Participant

    I already did…

    #1077781
    Paul R
    Moderator

    Hi,

    You can try adding !important.

    eg.

    h1,h2,h3,h4,h5,h6,
    .h1,.h2,.h3,.h4,.h5,.h6 {
           font-family: "ThinManGiambattista" !important;
    }
    

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1076132 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>