Changing fonts useing 'Fonts' plugin

  • lawhat

    #2628

    I have been searching for a while now and cant figure this out.

    Here is my website http://www.TechEh.ca

    I want to change the font for all the headers(post’s, widgets etc) to Tall Dark found here: http://fontsforweb.com/font/show/?id=383

    Is there an easy way of implementing this? I am not too familiar with CSS so go easy on me.

    Thanks guys,

    Josh

    #21171

    Okay, I’m kind of throwing this together, so it’s untested. But try adding this to your child theme functions.php file:

    function add_tall_dark_font () {
    <style type="text/css">
    @font-face{
    font-family: "talldark";
    src: url('http://fontsforweb.com/public/fonts/383/talldark.eot');
    src: local("Tall Dark And Handsome Condensed"), url('http://fontsforweb.com/public/fonts/383/talldark.ttf') format("truetype");
    }
    .fontsforweb_fontid_383 {
    font-family: "talldark";
    }
    </style>
    }
    add_action('wp_head', 'add_tall_dark_font');

    Now, wherever you want to apply this font, you just need to assign a class of fontsforweb_fontid_383. So, if you are using it for a header, your css might look something like this:

    <h2 class="fontsforweb_fontid_383">YOUR HEADING TEXT</h2>
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!