Wordpress wp_enqueue_script Not inclode js file

28 Views Asked by At

I'm developing a theme and trying to get wp_enqueue_script to work.

But it is not included, except that the CSS file is working.

I have this function:

function KYT_admin_scripts($dir)
{
    if('toplevel_page_KYT' != $dir){

    }

    wp_register_style('KYT-admin', get_template_directory_uri() . '/css/admin.css', array(), '1.0.0', 'all');
    wp_enqueue_style('KYT-admin');

    wp_register_script('KYT-admin-js', get_template_directory_uri() . '/js/admin.css', array('jQuery'), null, true);
    wp_enqueue_script('KYT-admin-js');
}
add_action('admin_enqueue_scripts', 'KYT_admin_scripts');
1

There are 1 best solutions below

0
On

it's working. the problem was in:

array('jQuery')

it's should be a Small Latter: array('jquery')