javascript - Remove a ver parameter from a URL - Wordpress -
i'm working on wordpress website , i'm running issue.
the code in functions file enqueue .js file is:
wp_enqueue_script( 'esro', 'https://tickets.leicesterymca.co.uk/iframe/esrojsapi.js', '', false );
however, when @ source code site, it's showing following url .js file:
<script type="text/javascript" src="https://tickets.leicesterymca.co.uk/iframe/esrojsapi.js?ver=4.7.3"></script>
i have been told problems i'm having might down perimeter @ end of url: ?ver=4.7.3 , remove it.
i guess rather stop being there in first place add more code remove i'm not sure thats option?
so firstly, how getting there , coming from? secondly, how can remove it?
you have set 4th parameter null rather false so:
wp_enqueue_script( 'esro', 'https://tickets.leicesterymca.co.uk/iframe/esrojsapi.js', '', null );
from docs:
$ver (string|bool|null) (optional) string specifying script version number, if has one, added url query string cache busting purposes. if version set false, version number automatically added equal current installed wordpress version. if set null, no version added.
Comments
Post a Comment