What can cause JavaScript and CSS files to be minified?
Did you check your hosting environment to see if they’ve enabled something like mod_pagespeed? https://developers.google.com/speed/pagespeed/mod
Did you check your hosting environment to see if they’ve enabled something like mod_pagespeed? https://developers.google.com/speed/pagespeed/mod
admin.php taking 14 seconds
Plugins enqueuing jquery in head
Your description of the problem is not very clear, and your inconsistent code formatting makes that hard to read (plus I am pretty sure some code is missing), but if the problem is running the query multiple times you can solve that with a static variable. function get_gametitle_info() { static $game_info_query = false; if (false … Read more
Hi this is what I did to solve it: add_filter( ‘script_loader_src’, ‘change_src’ ); add_filter( ‘style_loader_src’, ‘change_src’ ); function change_src( $url ) { if( is_admin() ) return $url; // Don’t filter admin area return str_replace( site_url(), ‘www.mysite.com/mydefaultnetworksite’, $url ); } I’m using both those filters because I want it to apply to script and stylesheet urls. … Read more
Instead of looping through each category and getting the posts for each, you can do it all in one query like this: $categories = array(‘8’, 17, 23, 423); $args = array( ‘category__in’ => $categories, ‘numberposts’ => 20 ); $recent_posts = get_posts($args); Cheers.
After many attempts, I found this plugin that implente the Google Minify solution to work fine. I guess this is the best way to go other than reinveinting the wheel. I’ve choosen this one because it allows to change the Minify script bahvior from the WP panel.
If you think that you are making too many DB requests then you need to reorganize the way you store your data to be more efficient. It might even be totally irelevant if you employ the right type of caching. If your visitors are usually not logged in then a full page caching that W3TC, … Read more
I will not worry to much about performance here, but I will optimize the code a bit by calling get_post_meta() only once. This will not increase or decrease performance as you will see in the post I have linked to later on, but it comes down to the principle of not repeating yourself. On the … Read more
Optimize WP_Query