How to solve ‘Eliminate render-blocking JavaScript and CSS in above-the-fold’ content for multiple files?

put this code at the end of functions.php add_action(‘customize_register’, ‘customizer’); function defer_parsing_of_js ( $url ) { if ( FALSE === strpos( $url, ‘.js’ ) ) return $url; if ( strpos( $url, ‘jquery.js’ ) ) return $url; return “$url’ defer “; } add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );

Best approach for loading a sidebar Only if the screen max-width is >900px?

On my website I load the recent comments per AJAX for window sizes above 480px: if ( 480 < jQuery(window).width() ) { jQuery(document).ready( function() { jQuery.get(‘http://toscho.de/?rc’, function(data) { jQuery(data).insertBefore(‘#inner’); } ); } ); jQuery(‘#posts’).after(‘<div class=clear>&#160;</div>’); } This code is quite old and not very elegant. But it may give you a hint for the right … Read more

Check and dequeue if multiple stylesheets exists using wp_style_is?

I have not tested this, but I imagine it is because you are passing an array to the $handle variable in your wp_style_is() function and not a string. Maybe try looping through the array so you pass it a single string to check against each time. Something Like this… add_action(‘wp_enqueue_scripts’, ‘dequeue_by_handles’, 999); function dequeue_by_handles() { … Read more

Create a full width responsive header image per page

John there are lots of ways to do this, depending on what you want exactly and how much experience you have with html/php/css (or how much time you’d want to spend learning). There are plenty of plugins on wordpress that could achieve this. You might want to just try some of them out: https://wordpress.org/plugins/search.php?q=custom+header If … Read more

How to dequeue a stylesheet by src, not handle?

I think you are talking about a rare scenario. “font-awsome” is the expected name that all plugins and themes should be using as handle. If the developer has not changed the source code of font awsome CSS file, there is no reason to change the name of the handle. Anyway, you can check the global … Read more

Adding dashicon fonts to the admin of pre 3.8 installs

This happens sometimes when the font is sent with a wrong MIME type. application/x-font-woff for example, is wrong. Try to add proper MIME types to your server configuration. In Apache, your can do that in a .htaccess: AddType image/svg+xml .svg AddType application/x-font-ttf .ttf AddType application/x-font-opentype .otf AddType application/vnd.ms-fontobject .eot AddType application/font-woff .woff You should add … Read more