I'm trying to load a custom js file on wordpress, I've upload to my javascript theme folder and I'm using the following code in functions.php but I can't make it work:
function wpb_adding_scripts() {
wp_register_script('service-graph', plugins_url('js/service-graph.js', __FILE__), array('jquery'),'1.1', true);
wp_enqueue_script('service-graph');
}
add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );
Thank you.