samedi 27 juin 2015

Why isn't my js script loading in WordPress

I am trying to add a bootstrap js script to my WordPress theme the "right" way but i'm not seeing a link to the js file in the head section of the webpage when it loads. Iv'e tried adding it to the header of the WordPress theme the "right" way but no luck. Not i'm trying in the functions.php file and still no luck. Please help!

function buns_bootstrap_run(){


        wp_register_script('bootstrap-js', get_stylesheet_directory() . '/js/bootstrap.min.js', array('jquery'),'3.2.0', false);

        wp_enqueue_script('bootstrap-js');

        }

    add_action('wp_enqueue_script', 'buns_bootstrap_run');

Aucun commentaire:

Enregistrer un commentaire