Created
December 6, 2021 19:36
-
-
Save digisavvy/c3e63dd2147ec7679354e4ebc1856b37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dgs_preload_font() { | |
?> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/uploads/2021/10/calibre-web-light.woff2" as="font" type="font/woff2" crossorigin> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/uploads/2021/10/calibre-web-regular.woff2" as="font" type="font/woff2" crossorigin> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/uploads/2021/10/calibre-web-medium.woff2" as="font" type="font/woff2" crossorigin> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/uploads/2021/10/calibre-web-light-italic.woff2" as="font" type="font/woff2" crossorigin> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/uploads/2021/10/calibre-web-semibold.woff2" as="font" type="font/woff2" crossorigin> | |
<?php } | |
add_action( 'wp_head', 'dgs_preload_font' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment