skip to Main Content

Snippet: How to preload theme icons woff files

Important: This is no longer required! The theme does this automatically now.

The following snippet can be used to automatically preload the theme's Icon Fonts.

add_action( 'wp_head', function() {
	echo '<link rel="preload" href="' . get_template_directory_uri() . '/assets/lib/ticons/fonts/ticons.woff2" type="font/woff2" as="font" crossorigin>';
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend WPCode)
Back To Top