This topic has 6 replies, 3 voices, and was last updated 8 years by rgibbs.

  • Author
  • #59405
     rgibbs
    Participant

    Is there a header field for code anywhere in theme settings? I can find the footer field in General but not one for header. It’s for TypeKit. I’ve been putting the script directly in header.php but it gets overwritten at update. Thanks.

    #59571
     Laura
    Moderator

    Hello, you can use header and footer plugin https://wordpress.org/plugins/header-footer/
    Let me know if it works 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #59573
     rgibbs
    Participant

    Hi Laura. Thanks for your reply. I’m afraid I’d prefer a theme field, rather than use yet another plugin which requires updating, especially as I’d prefer the fonts to load before the plugin. Yoast also asks you to deactivate that specific plugin to avoid conflicts. I’ll add the code required into header.php manually and redo it at each update. It just seemed odd that there’s a footer field in the theme but not one for the header. Thanks again.

    #59719
     Laura
    Moderator

    Hello, you should activate the childtheme and do all changes there, so when you update you do not lose your changes 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #59722
     rgibbs
    Participant

    Thanks Laura. I am using a child theme, but adding in copies of files such as header.php means any changes in updates have to be manually carried across to them. This is my first time with KLEO, and it’s not the end of the world, just that the majority of premium themes I’ve worked with ie. Woo, WPZoom, etc. have both header and footer fields, and it seemed odd that KLEO had a footer but no header field that’s preserved during updates.

    #62763
     Andrei
    Moderator

    Hi,

    Here is a small tutorial about how you can add custom code to header without touching theme files, just using the functions.php file.
    http://stanhub.com/how-to-add-custom-content-to-head-section-of-page-using-wp_head-wordpress-hook/

    Let me know if it worked.
    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #62824
     rgibbs
    Participant

    Thanks Andrei, it doesn’t work, you can still see the fallback font first before Typekit gets called. Also, I presume there’s an equal risk that page.php will get overwritten at some point. I’ll just add the script back in manually at each update. In a future release of KLEO perhaps consider adding a header field next to the footer field, as that would be helpful for those of us that use Typekit.

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

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?