2014-04-08 2 views
0

Я использую функцию ниже, чтобы зарегистрировать и поставить в очередь скрипты в моем файле functions.php. Проблема только в одном скрипте (custom.js), похоже, не помещается в очередь .... когда я просматриваю источник моей страницы здесь: http://dev1.envisionwebdesign.co/features/ custom.js не загружен. Есть предположения?wordpress enqueues некоторые скрипты и другие страницы

function register_my_scripts() { 
wp_register_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'),null, true); 
wp_register_script('nicescroll', get_template_directory_uri() . '/js/jquery.nicescroll.min.js', array('jquery'),null, true); 
wp_register_script('custom', get_template_directory_uri() . '/js/custom.js', array('jquery','nicescroll'),null, true); 
wp_enqueue_script('jquery'); 
wp_enqueue_script('bootstrap'); 
wp_enqueue_script('nicescroll'); 
wp_enqueue_style('custom'); 
} 

add_action('wp_enqueue_scripts', 'register_my_scripts'); 

ответ

0

Просто измените

wp_enqueue_style('custom'); 

в

wp_enqueue_script('custom'); 
+0

Ahhhh иногда прямо перед вами. Благодаря :) – user3512391

Смежные вопросы