Make different sites on multisite reference same script

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

Recent posts headlines. How to optimize the loop

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.

Combine several CSS files into one

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.

ordering and optimizing functions

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)