// Creates the function
function my_custom_javascript()
{
// Loads the script into the function
wp_enqueue_scripts('my_custom_javascript', plugin_dir_url(__FILE__) . '/assets/js/custom.js', array('jquery'));
}
// calls the function where the script is located
add_action('wp_enqueue_scripts', 'my_custom_javascript');
I think this is written right. I am calling this script in the functions.php file in my theme but it's not loading, so I was hoping I could get some suggestions.
wp_enqueue_script()
, notwp_enqueue_scripts()
. Have you tried that and it's just a typo in your question?