• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

page speed optimization: Preload fonts (navigation pro)

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › page speed optimization: Preload fonts (navigation pro)

This topic is: not resolved

Tagged: fonts, Page Speed, preeload

  • This topic has 3 replies, 3 voices, and was last updated 2 years ago by Dadao.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • November 10, 2020 at 7:42 pm #501868
    Dadao
    Participant

    Hey guys,

    I tried everything but nothing worked. In page speed insights I get asked to preload important stuff like this one: wp-content/themes/navigation-pro/lib/fonts/ionicons.woff2?v=4.6.3

    I found several articles online saying I need to put the following in the head via function.php:

    /** Head Font Preloading **/
    function font_preloading_preload_key_requests() { ?>
    <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/navigation-pro/fonts/Aileron-Regular.woff2" crossorigin="anonymous">
    <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/navigation-pro/fonts/Roboto-Light.woff2" crossorigin="anonymous">
    <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/navigation-pro/lib/fonts/ionicons.woff2?v=4.6.3" crossorigin="anonymous">
    <?php }
    add_action( 'wp_head', 'font_preloading_preload_key_requests' );

    I tried, but nothing changed. Any Idea?

    Thx in advance for ur help!

    https://esario.de/wissen/yoga/
    January 21, 2021 at 11:19 am #502776
    Matt M.
    Participant

    Somebody correct me if I'm wrong please, but I don't think you can preload fonts on your own domain. Preloading is for external resources.

    January 23, 2021 at 4:34 am #502793
    chakkra101
    Participant

    If you don't mind to use plugin try this one, Asset CleanUp. The main feature is unload unnecessary plugins' javascript or stylesheet. Go to 'Settings' --> 'Google Fonts' section to add preload fonts.

    January 23, 2021 at 6:15 am #502794
    Dadao
    Participant

    Awesome man, exactly what I was looking for! Thx so much for this hint!!! The Google Fonts: Load Optimizer solved the problem.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble