I am trying to create a wordpress theme from scratch, but when adding
add_action('wp_enqueue_scripts', 'jquery');
to have my js script alert pop up on the page I get
Parse error: syntax error, unexpected '', 1, true); ' (T_CONSTANT_ENCAPSED_STRING), expecting ')'
for that line
function include_jquery() {
wp_deregister_script('jquery');
wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery3.3.1.min.js, '', 1, true);
add_action('wp_enqueue_scripts', 'jquery');
}
add_action('wp_enqueue_scripts', 'include_jquery');
I expected the code to bring up my alert from my js file.
$(document).ready(function() {
alert('test');
})