基于这个问题,我想你们想知道如何在wordpress中创建子主题。
我将在下面与您分享该步骤和参考链接。
这是我的参考链接Click Here
下面给出了创建子主题的步骤
// You need to add one folder in theme folder like following
parent theme name test then make child theme as test-child
// then create style.css file in that child folder and add following code.
/*
Theme Name: Twenty Seventeen child // your child theme name
Template: twentyseventeen // parent theme name here
*/
// once this done add function.php file that override parent theme functionality and add following lines in that.
add_action( \'wp_enqueue_scripts\', \'AddParentTheme\' );
function AddParentTheme() {
wp_enqueue_style( \'parent-style\', get_template_directory_uri() . \'/style.css\' );
}
您的主题已经准备好了,现在保存文件并签入apperence您的子主题就在那里了。
谢谢,希望你能使用这个。