Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #993387

    Hi
    for speedreasons i need to know how to remove query strings from static resources.
    I tried this in my functions.php but that does not help:

    function _remove_script_version( $src ){ 
    $parts = explode( '?', $src ); 	
    return $parts[0]; 
    } 
    add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); 
    add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

    How to fix that your theme adds parameters to static ressources?

    regards marcus

    #993453

    Hey MarcusJeroch,

    Did you try a plugin like this? https://wordpress.org/plugins/remove-query-strings-from-static-resources/

    Best regards,
    Rikard

    #993500

    Hi Rikard
    Please dont recommend me plugins in the first place. Every plugin slows down a bit.
    I use a child theme and i need a solution via functions.php (or similar)
    thanx marcus

    #993627

    Hi Marcus,

    Plugins are made up of code just as any function you would add to functions.php. If you don’t want our recommendations then there is always search engines to use.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.