2014-06-20 45 views
-2

我創建一個新的style.css並在兒童主題中使用它。然後我在wp-content中創建一個新文件夾,並將其命名爲themename-child,並上傳我創建的style.css。現在,我去wp儀表板 - >外觀 - >主題,我看看我創建的兒童主題。我發現這個錯誤:如何在Wordpress中激活兒童主題?

Broken Themes 

The following themes are installed but incomplete. Themes must have a stylesheet and a template. 

Name Description 
Accesspress Lite The parent theme is missing. Please install the "AccesspressLite" parent theme. 

有什麼我需要上傳?請幫幫我。我是WordPress新手。謝謝!

回答

0

似乎很清楚,我認爲你需要安裝的母題,這是需要的兒童主題安裝...

The parent theme is missing. Please install the "AccesspressLite" parent theme.

兒童主題的全部目的是將其送至它調整成父主題,因此您不必調整父主題設置。

1

沒有,這裏的問題是,你必須在你的孩子的style.css

例的評論面積由WordPress的法典指定父模板

/* 
Theme Name: Twenty Fourteen Child 
Theme URI: http://example.com/twenty-fourteen-child/ 
Description: Twenty Fourteen Child Theme 
Author:  John Doe 
Author URI: http://example.com 
Template:  twentyfourteen 
Version:  1.0.0 
Tags:   light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready 
Text Domain: twenty-fourteen-child 
*/ 

@import url("../twentyfourteen/style.css"); 

線與

Template:  twentyfourteen 

是你的需要。您的父母主題必須位於相應的文件夾中,在本示例中爲themes/twentyfourteen。

此外,在您的父模板中,您必須通過get_stylesheet_uri()爲child主題加載style.css才能正常工作。