I want to use the built-in (wp-includes) Jquery-UI components on the site. There is such a code to connect:

function html5blank_header_scripts() { if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) { wp_register_script('conditionizr', get_template_directory_uri() . '/js/lib/conditionizr-4.3.0.min.js', array(), '4.3.0'); // Conditionizr wp_enqueue_script('conditionizr'); // Enqueue it! wp_register_script('modernizr', get_template_directory_uri() . '/js/lib/modernizr-2.7.1.min.js', array(), '2.7.1'); // Modernizr wp_enqueue_script('modernizr'); // Enqueue it! //wp_register_script('html5blankscripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), '1.0.0'); // Custom scripts //wp_enqueue_script('html5blankscripts'); // Enqueue it! wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-datepicker'); wp_register_script('semantic', get_template_directory_uri() . '/semantic/dist/semantic.min.js', array('jquery'), '1.0', true); wp_enqueue_script('semantic'); } } add_action('init', 'html5blank_header_scripts'); 

Specially didn’t remove too much - for example, the Semantic UI and the rest connects normally, but the jquery-ui components are not: they are simply not present in the list of included scripts.

We tried several different ways, including connecting via explicitly specifying the path in the / wp-includes directory in the wp_register_script function, also specifying dependencies, but in vain, only jquery, which is connected by the Wordpress core itself, works fine.

    1 answer 1

    As I recall, when I had to deal with such a problem, I turned off jquery (deregister and dequeue) and turned on ui.

    Everything should work, because the jQuery UI is a jQuery javascript JavaScript Library.

    • H-inattention. When editing a line, the wp_footer () call from footer.php was removed, as a result, all connected things were missing. Thank you for taking the time and trying to answer the question with obviously insufficient information, I will mark the answer. - Pavel Weisberg