2014-09-26 24 views
0

經過很長時間,我又一次製作WordPress兒童主題。我知道我需要知道的關於創建兒童主題的WordPress的每個部分。但是這次我無法制作繼承父母主題的小孩主題。 我的情況發生了什麼?在WordPress中繼承父主題中的文件

的style.css文件

/* 
Theme Name: ifn child theme 
Them URI: ifn.org.np 
Description: This is child theme of ifn 
Author:suku 
Author URI:suku.com.np 
Template: ifn 
Version:1.0 
*/ 
@import url('../ifn/style.css'); 
+0

試試這個:@import url(「../ ifn/style.css」);通過這個http://codex.wordpress.org/Child_Themes ..它會幫助你 – 2014-09-26 10:29:27

+0

對不起,因爲我犯了一個簡單的錯誤命名主題爲ifn孩子。 – Suku 2014-09-28 04:02:56

回答

0

您也可以使用下面的代碼添加父樣式表: -

add_action('wp_enqueue_scripts', 'load_my_styles'); 
function load_my_styles() { 
    wp_enqueue_style('parent-theme', get_template_directory_uri() . '/style.css'); 
} 

希望這將幫助你!