Your WP Expert
Forum Replies Created
-
Forum: Plugins
In reply to: [Remove Query Strings From Static Resources] Some strings are strong ;-)Sorry about that, hopefully there will be time for a update of this plugin soon.
If you know some basic php you can use this code in your functions.php to get rid of the last query strings.
function _remove_query_strings_rev( $src ){ $rqs = explode( '?rev', $src ); return $rqs[0]; } add_filter( 'script_loader_src', '_remove_query_strings_rev', 15, 1 ); add_filter( 'style_loader_src', '_remove_query_strings_rev', 15, 1 );Sorry, this is option is not available in this version of the plugin.
But if you know some basic php you can use this code in your functions.php file instead of the plugin.
Just replace this link with yours: http://fonts.googleapis.com/css?family=Amaranth&ver=3.5
function _remove_script_version( $src ){ $excludes = array( 'http://fonts.googleapis.com/css?family=Amaranth&ver=3.5', ); $result = $src; if ( ! in_array($src, $excludes) ) { $parts = explode( '?ver', $src ); $result = $parts[0]; } return $result; } add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );Forum: Plugins
In reply to: [Remove Query Strings From Static Resources] Plugin has no effect on contentHi David,
If you’re using any kind of cache plugin, you may need to delete your old cache files and rebuild the cache files after activating the plugin.
If you look at the source code on your site, do you see the ?ver= strings there, or is it only tools such as Pingdom that sees them?
If you want me to take a closer look at your site, you can always post a ticket(with your site details) at our site located in my profile.