Приоритет стиля дочерней темы
-
Здравствуйте.
Создал дочернюю тему, подключил стили , но мне нужно , что бы мои стили имели приоритет, если я в них изменяю уже существующие правила.
Как это сделать? Гугл не помог, либо у меня просто кривые руки.
Стиль: Fashion Designer от https://www.vwthemes.com/
Мой код в finction.php:<?php //Подгрузка стилей с родительской темы add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' ); function enqueue_parent_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } // // Заношу CSS стили и JS скрипты в функцию function biomond_fashiondesigner_scripts_styles(){ global $wp_styles; // Регистрирую стили wp_register_style( 'bio_style', get_stylesheet_directory_uri() . '/assets/css/all.css', array(), '1.0', 'screen'); wp_register_style( 'bio_style1', get_stylesheet_directory_uri() . '/assets/css/style.css', array(), '1.0', 'screen'); wp_register_style( 'bio_style2', get_stylesheet_directory_uri() . '/assets/css/responsive.css', array(), '1.0', 'screen'); wp_register_style( 'bio_style3', get_stylesheet_directory_uri() . '/assets/css/datepicker.min.css', array(), '1.0', 'screen'); // Подключаю стили wp_enqueue_style( 'bio_style'); wp_enqueue_style( 'bio_style1'); wp_enqueue_style( 'bio_style2'); wp_enqueue_style( 'bio_style3'); // Регистирую файлы с JS скриптом wp_register_script( 'bio_scrypt', get_stylesheet_directory_uri(), 'assets/js/all.js' , array(), '1.0', false); wp_register_script( 'bio_scrypt1', get_stylesheet_directory_uri(), 'assets/js/custom.js' , array(), '1.0', false); wp_register_script( 'bio_scrypt2', get_stylesheet_directory_uri(), 'assets/js/datepicker.min.js' , array(), '1.0', false); wp_register_script( 'bio_scrypt3', get_stylesheet_directory_uri(), 'assets/js/footer.js' , array(), '1.0', false); wp_register_script( 'bio_scrypt4', get_stylesheet_directory_uri(), 'assets/js/site.min.js' , array(), '1.0', false); // Подключаю файлы с JS скриптом wp_enqueue_script( 'bio_scrypt'); wp_enqueue_script( 'bio_scrypt1'); wp_enqueue_script( 'bio_scrypt2'); wp_enqueue_script( 'bio_scrypt3'); wp_enqueue_script( 'bio_scrypt4'); } // Добавляю action для запуска функции add_action( 'wp_enqueue_scripts', 'biomond_fashiondesigner_scripts_styles', 1 ); ?>
Просмотр 1 ответа (всего 1)
Просмотр 1 ответа (всего 1)
- Тема «Приоритет стиля дочерней темы» закрыта для новых ответов.