Fix FOUC ‘flash of unstyled content’ on WordPress

FOUC aka ‘flash of unstyled content’ is a bit of a pain after a layout has been put together but does not load without that flash of odd content jumbled up on load.

Using a snippet of jQuery by adding and later removing a CSS class of hidden to the html element but then showing it all when the document is ready is a good way to combat FOUC.

add_action('wp_head', 'fouc_protect_against');
 * Combat FOUC in WordPress
 * @link
function fouc_protect_against () {
        <style type="text/css">
            .hidden {display:none;}
        <script type="text/javascript">
	 jQuery(document).ready(function($) {		            


Add in your functions.php