Important:
This support area is for Kalium 3 users only.
Support for Kalium 4 has moved to our new platform at support.laborator.co.
If you’re using Kalium 4, please create a new account there using your email and license key. A password will be sent to you automatically.
Hi, I want to preload this asset. Because it causes speed problem. Can you help?
Hi,
The font is included in:
So the code to preload the font file is this:
add_action( 'wp_head', function() { printf( '<link rel="preload" href="%s" as="font">', esc_attr( get_template_directory_uri() . '/assets/js/slick/fonts/slick.woff' ) ); }, 1 );If I place this code am I able to preload it?
Where should I place this code?
Hi,
The code should be added in functions.php (end of file). I have modified to fix few missing attributes:
add_action( 'wp_head', function() { printf( '<link rel="preload" href="%s" as="font" type="font/woff" crossorigin>', esc_attr( get_template_directory_uri() . '/assets/js/slick/fonts/slick.woff' ) ); }, 1 );The browser will preload it automatically based on your question this is how preloading font works.
Thank you a lot :) It was very helpful