wp_enqueue script my_javascript_file in the footer

You have true set in the 4th parameter (version), not the 5th.

wp_enqueue_script(
    'my_javascript_file',                                 //slug
    get_template_directory_uri() . '/javascripts/app.js', //path
    array('jquery'),                                      //dependencies
    false,                                                //version
    true                                                  //footer
);

Also, as someone else mentioned, drop jquery enqueue, you’ve got it as a dependency, you don’t need to enqueue it as well.

One last thing, your function name has a good chance of breaking your site somewhere down the line. load_scripts has a pretty large chance of conflicting with something from the core or from the theme/plugin.

Leave a Comment

error code: 523