I'm loading a custom script file using an enqueue and here's the output:
<script type='text/javascript' src='.../wp-content/themes/enfold-child/js/custom_script.js?ver=4.5.1'></script>
curious why it's appending that "?ver=4.5.1" at end. When I remove in console file loads fine, but when it's there blank file. Not sure if that's a caching thing or I should be loading some other way. Here's my enqueue code:
add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets');
function my_scripts_method() {
wp_enqueue_script(
'custom-script',
get_stylesheet_directory_uri() . '/js/custom_script.js',
array( 'jquery' )
);
}
add_action( 'wp_enqueue_scripts', 'my_scripts_method' );