Created
September 21, 2016 21:51
-
-
Save jamigibbs/66695274794d797e9b6c2dd34e661c50 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 mytheme_avoid_fouc(){ | |
echo '<script type="text/javascript">document.documentElement.className = \'js\';</script>'; | |
} | |
add_action( 'wp_head', 'mytheme_avoid_fouc', 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment