在您的功能中。php文件(您使用的是自定义子主题,对吗?)将版本参数更改/添加到wp_get_theme()->get( \'Version\' )
这将从主题样式中提取版本号。css文件。
https://developer.wordpress.org/reference/functions/wp_enqueue_style/
将此参数设置为false将使用WordPress版本。
wp\\u get\\u theme()返回包含版本的当前主题的主题对象。wp\\u get\\u theme()->parent()->get(\'Version\')将返回父主题版本。
$parent_style = \'wp-bootstrap-starter\';
wp_enqueue_style( $parent_style, get_template_directory_uri() . \'/style.css\', false, wp_get_theme()->parent()->get( \'Version\' ) );
wp_enqueue_style(
\'child-style\',
get_stylesheet_directory_uri() . \'/style.css\',
array( $parent_style ),
wp_get_theme()->get( \'Version\' )
);