How to connect scripts in WordPress?

  • 0
    The script is not connected to the page. Everything is as it should be, at the very bottom of functions.php
    function js() {
        wp_register_script('js', get_template_directory_uri().'js/script.js', array(), '20151215', true );
    add_action( 'wp_enqueue_scripts', 'js' );

    But absolutely nothing happens, no error, nothing. The script itself is 100% working, if connected according to the standard via & lt; script & gt; , it works (though it swears that it cannot find some elements, but at least there is an error). What am I doing wrong?
    JavaScript Anonymous, Oct 18, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!