Last active
April 16, 2022 22:27
-
-
Save TheRealSimon42/a61d8f46896a3798a82fd43937083a7d to your computer and use it in GitHub Desktop.
Function to Prealod CSS FIles in WordPress via Function
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
/** Head Style Preloading **/ | |
function style_preloading_preload_key_requests() { ?> | |
<link rel="preload" as="style" href="/wp-content/themes/navigation-pro/style.css" crossorigin="anonymous"> | |
<?php } | |
add_action( 'wp_head', 'style_preloading_preload_key_requests' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment