После установки шаблона на wordpress не работает большинство скриптов идущих с шаблоном.
Подключаю стили и скрипты шаблона wordpress в файле functions.php через конструкцию:
add_action( 'wp_enqueue_scripts', 'transproekt_style' );
add_action( 'wp_enqueue_scripts', 'transproekt_scripts' );
function transproekt_style() {
wp_enqueue_style( 'responsive-style', get_template_directory_uri() . '/assets/css/responsive.css' );
wp_enqueue_style( 'owl.theme.default.min-style', get_template_directory_uri() . '/assets/css/owl.theme.default.min.css' );
wp_enqueue_style( 'owl.carousel.min-style', get_template_directory_uri() . '/assets/css/owl.carousel.min.css' );
wp_enqueue_style( 'magnific-popup-style', get_template_directory_uri() . '/assets/css/magnific-popup.css' );
wp_enqueue_style( 'font-awesome.min-style', get_template_directory_uri() . '/assets/css/font-awesome.min.css' );
wp_enqueue_style( 'bootstrap.min-style', get_template_directory_uri() . '/assets/css/bootstrap.min.css' );
wp_enqueue_style( 'jquery.animatedheadline', get_template_directory_uri() . '/assets/css/jquery.animatedheadline.css' );
wp_enqueue_style( 'animate.min-style', get_template_directory_uri() . '/assets/css/animate.min.css' );
wp_enqueue_style( 'main-style', get_stylesheet_uri() );
}
function transproekt_scripts() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', '/assets/js/jquery-3.0.0.min.js' );
wp_register_script( 'jquery', '/assets/js/bootstrap.min.js' );
wp_register_script( 'jquery', '/assets/js/scrollIt.min.js' );
wp_register_script( 'jquery', '/assets/js/jquery.animatedheadline.min.js' );
wp_register_script( 'jquery', '/assets/js/jquery.magnific-popup.min.js' );
wp_register_script( 'jquery', '/assets/js/isotope.js' );
wp_register_script( 'jquery', '/assets/js/portfolio-filter.js' );
wp_register_script( 'jquery', '/assets/js/wow.min.js' );
wp_register_script( 'jquery', '/assets/js/jquery.waypoints.js' );
wp_register_script( 'jquery', '/assets/js/init.js' );
wp_register_script( 'jquery', '/assets/js/owl.carousel.min.js' );
wp_register_script( 'jquery', '/assets/js/main.js' );
wp_enqueue_script( 'jquery-3.0.0.min-script', get_template_directory_uri() . '/assets/js/jquery-3.0.0.min.js' );
wp_enqueue_script( 'bootstrap.min-script', get_template_directory_uri() . '/assets/js/bootstrap.min.js' );
wp_enqueue_script( 'scrollIt.min-script', get_template_directory_uri() . '/assets/js/scrollIt.min.js' );
wp_enqueue_script( 'jquery.animatedheadline.min-script', get_template_directory_uri() . '/assets/js/jquery.animatedheadline.min.js' );
wp_enqueue_script( 'jquery.magnific-popup.min-script', get_template_directory_uri() . '/assets/js/jquery.magnific-popup.min.js' );
wp_enqueue_script( 'isotope-script', get_template_directory_uri() . '/assets/js/isotope.js' );
wp_enqueue_script( 'portfolio-filter-script', get_template_directory_uri() . '/assets/js/portfolio-filter.js' );
wp_enqueue_script( 'wow.min-script', get_template_directory_uri() . '/assets/js/wow.min.js' );
wp_enqueue_script( 'jquery.waypoints.js-script', get_template_directory_uri() . '/assets/js/jquery.waypoints.js' );
wp_enqueue_script( 'init-script', get_template_directory_uri() . '/assets/js/init.js' );
wp_enqueue_script( 'owl.carousel.min-script', get_template_directory_uri() . '/assets/js/owl.carousel.min.js' );
wp_enqueue_script( 'main-script', get_template_directory_uri() . '/assets/js/main.js');
Почему не работает большая часть скриптов?
Вот ссылка на пациента - psk-transproekt.ru
Вопрос задан
более трёх лет назад
59 просмотров