我如何找出父主题的style.css $ handle

时间:2019-03-19 18:39:43

标签: wordpress wordpress-theming

我想使用下划线在WordPress中制作子主题

WordPress手册建议我们排入父样式.css时遵循以下代码

<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {

$parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the 
Twenty Fifteen theme.

wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' 
);
wp_enqueue_style( 'child-style',
    get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
    wp_get_theme()->get('Version')
);
}
?

在这里

$parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the 
Twenty Fifteen theme.

哪里

“父样式”是$ handle。是样式表的名称。

现在如何找到父主题样式表名称?

0 个答案:

没有答案