Prevent Flash of Unstyled Content

//Fix FOUC ‘flash of unstyled content’ on WordPress
add_action('wp_head', 'fouc_protect_against');
function fouc_protect_against()
{
?>
        <style type="text/css">
            .hidden {display:none;}
        </style>
        <script type="text/javascript">
         jQuery('html').addClass('hidden');
	            
	 jQuery(document).ready(function($) {		            
	    $('html').removeClass('hidden');	            
	 });  
        </script>
    <?php
}
[instagram-feed feed=1]
© 2024 BenaDigital Limited | All Rights Reserved
magnifiercrosschevron-down