This file contains 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
add_filter( 'astra_enable_default_fonts', 'temp_disable_astra_fonts' ); | |
function temp_disable_astra_fonts( $load ) { | |
$load = false; | |
return $load; | |
} | |
add_action( 'wp_head', 'add_astra_fonts_preload', 1 ); | |
function add_astra_fonts_preload() { | |
?> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/themes/astra/assets/fonts/astra.woff" as="font" type="font/woff" crossorigin /> | |
<link rel="preload" href="<?php echo get_site_url(); ?>/wp-content/themes/astra/assets/fonts/astra.ttf" as="font" type="font/ttf" crossorigin /> |