Почему файлы из папок дочерней темы не Переопределились ,а файлы в корне Переопределились?

Почему файлы из папок дочерней темы не Переопределились ,а файлы в корне Переопределились?

через консоль:

/wp-content/themes/panthar-child/style.css

и

/wp-content/themes/panthar/assets/css/main-style-ltr.cs

Мне помогло Переопределить подключение через functions.php (полная замена)

function panthar_child_override_main_style() {
    // 1. Убираем родительский файл
    wp_dequeue_style('panthar-main-style');
    wp_deregister_style('panthar-main-style');
    
    // 2. Подключаем ваш файл из дочерней темы
    wp_enqueue_style(
        'panthar-child-main-style',
        get_stylesheet_directory_uri() . '/assets/css/main-style-ltr.css',
        array(),
        wp_get_theme()->get('Version')
    );
}
add_action('wp_enqueue_scripts', 'panthar_child_override_main_style', 20);
guest
Другие сообщения форума
Закрыть меню
ZAPLATA.RU | Магазин готовых блогов Wordpress с автонаполнением
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.