Я пытался настроить css дочерней темы.
Если я изменю style.css
дочерней темы, она будет закомментирована на устройствах iOS.
Затем я попытался поставить новую таблицу стилей в очередь, и в результате эта таблица стилей вообще не появляется в разделе head
(всегда в iOS, версия для настольного компьютера работает как шарм).
Это мой код для добавления в таблицу стилей:
function wp_enqueue_styles() {
$handle = 'custom_style';
$path = get_stylesheet_directory_uri() . '/css/';
$directory = get_stylesheet_directory() . '/css/';
$dependencies = [];
$version = '1.0';
$filename = 'main.css';
$filename_min = 'main.min.css';
if ( file_exists( $directory . $filename_min ) ) {
wp_register_style( $handle, $path . $filename_min );
wp_enqueue_style( $handle, $path . $filename_min, $dependencies, $version );
} else if ( file_exists( $directory . $filename ) ) {
// override version with file changed time to bypass cache problems
wp_register_style( $handle, $path . $filename );
wp_enqueue_style( $handle, $path . $filename, $dependencies, $version );
}
}
Есть идеи?