Home>Support>Possible to preload .woff file?

Possible to preload .woff file?

I get this type of error https://web.dev/uses-rel-preload
from wp-content/plugins/so-widgets-bundle/css/slider/fonts/slider.woff

“Read important resources in advance”
“1,32 s”
“It’s good to use “ to prioritize fetching of resources that will be requested later whilst loading the page. Read more.”

It’s taking my site 1.32seconds extra because of this slider.woff thing. I’m not even using sliders on my website. Please can somebody help me get rid of this warning and extra loading time? My website is on the adress www.mobilmeckaren.se
Thank you in advance and best regards – Simon

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 4 years, 10 months ago Andrew Misplon
    Hi, I Work Here

    Hi Simon

    Thanks for reaching out.

    The Hero widget on your home page has the ability to be a slider. The web font file in question supplies elements like the slider navigation arrows. If you wanted to, you could in theory re-build that same feature using a Headline or Editor widget, a Button widget and the row background for the image.

    I’ve updated our FAQ to explain why web font files aren’t preloaded: Page: FAQ. There is a function listed in the FAQ. It’s an intermediate task, functions can be added via the Code Snippets plugin or a child theme functions.php file. If you wanted to use the function you’d need to add a conditional for your home page, for example, the function would need to be:

    function siteorigin_preload_slider_font() {	if ( ! is_front_page() ) return; ?>	<link rel="preload" href="<?php echo plugin_dir_url( SOW_BUNDLE_BASE_FILE ); ?>css/slider/fonts/slider.woff" as="font"><?php }add_action( 'wp_head', 'siteorigin_preload_slider_font' );

    To remain viable, our free support scope is limited to basic usage and troubleshooting. I, unfortunately, I can’t provide much more assistance on a topic like this within our free support. For further help or function customization, please, consider our premium support service. Hopefully, you’ll find one of the above options helpful.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More