Hello, I’ve a problem with all my websites where I’m using your beautiful theme.
If I test the website with the GTmetrix tool, the result is always that I need to “Defer parsing of JavaScript”.
To do it I have two possibilities:
1) install and active “Async JavaScript” plugin
or
2) insert this code in function.php
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 );
Well, whatever process I use, I solve the problem (as you can see by the links in PVT). However, with both methods, there is a problem: the buttons on the Portfolio page stop working.
How to solve the problem? Maybe could I exclude the Portfolio page only in some way?