Как правильно подключить скрипты и стили в дочернюю тему wordpress?

Рейтинг: 0Ответов: 0Опубликовано: 13.04.2015

Всем привет! Хочу в дочернюю тему wordpress подключить стили скрипты в файл functions.php

<?php

// enqueue the child theme stylesheet

Function wp_schools_enqueue_scripts() {
wp_register_style( 'childstyle', get_stylesheet_directory_uri() . '/style.css'  );
wp_enqueue_style( 'childstyle' );
wp_register_style( 'animatestyle', get_stylesheet_directory_uri() . '/animate.css'  );
wp_enqueue_style( 'animatestyle' );
wp_register_style( 'ioniconsstyle', get_stylesheet_directory_uri() . '/ionicons.min.css'  );
wp_enqueue_style( 'ioniconsstyle' );
}
function my_scripts_method(){
	wp_enqueue_script( 'newscript', get_stylesheet_directory_uri() . '/script.js');
	wp_enqueue_script( 'candyplugins', get_stylesheet_directory_uri() . '/candy-plugins.js');
}
add_action( 'wp_enqueue_scripts', 'wp_schools_enqueue_scripts', 11);
add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
?>

Пытаюсь подключить скрипты и стили в wordpress. Стили подключаются норм, а скрипты не работают..(( Где косяк?

Ответы

Ответов пока нет.