New Landing How can we help? Themeforest Theme Support Dante Webfont Needs Insert Link in Header

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #103613
    Brookebot
    Member
    Post count: 112

    I can’t find any place within the theme options to put something in the <head>, I need help inserting this into my site’s <head> via my child theme’s functions.php for the webfont I just purchased (I believe using functions.php will save me from future trouble when updates occur in header.php):

    <!--
    /**
     * @license
     * MyFonts Webfont Build ID 2868304, 2014-08-24T17:17:36-0400
     * 
     * The fonts listed in this notice are subject to the End User License
     * Agreement(s) entered into by the website owner. All other parties are 
     * explicitly restricted from using the Licensed Webfonts(s).
     * 
     * You may obtain a valid license at the URLs below.
     * 
     * Webfont: Carrotflower by Tart Workshop
     * URL: http://www.myfonts.com/fonts/tart-workshop/carrotflower/regular/
     * Copyright: Copyright (c) 2009 by Font Diner - Designed by Crystal Kluge/Tart
     * Workshop. All rights reserved.
     * Licensed pageviews: 10,000
     * 
     * 
     * License: http://www.myfonts.com/viewlicense?type=web&buildid=2868304
     * 
     * © 2014 MyFonts Inc
    */
    
    -->
    <link rel="stylesheet" type="text/css" href="MyFontsWebfontsKit.css">

    Thank you so much for you time. I really appreciate your help. Swift Ideas Support Team is awesome!

    #103654
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @Brookebot,

    All you need to do is add this function:

    function mywebfont_headlink() { ?>
        <!--
    /**
     * @license
     * MyFonts Webfont Build ID 2868304, 2014-08-24T17:17:36-0400
     * 
     * The fonts listed in this notice are subject to the End User License
     * Agreement(s) entered into by the website owner. All other parties are 
     * explicitly restricted from using the Licensed Webfonts(s).
     * 
     * You may obtain a valid license at the URLs below.
     * 
     * Webfont: Carrotflower by Tart Workshop
     * URL: http://www.myfonts.com/fonts/tart-workshop/carrotflower/regular/
     * Copyright: Copyright (c) 2009 by Font Diner - Designed by Crystal Kluge/Tart
     * Workshop. All rights reserved.
     * Licensed pageviews: 10,000
     * 
     * 
     * License: http://www.myfonts.com/viewlicense?type=web&buildid=2868304
     * 
     * © 2014 MyFonts Inc
    */
    
    -->
    <link rel="stylesheet" type="text/css" href="MyFontsWebfontsKit.css">
    <?php }
    add_action('wp_head', 'mywebfont_headlink');

    Hope that helps!

    – Ed

    #103657
    Brookebot
    Member
    Post count: 112

    Thank you so much!

    #103664
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    You’re welcome!

    – Ed

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register