0
Wordpress에서 twentyfifteen의 하위 테마를 만들고 부모 테마의 스타일 시트 파일을 두 개 이상 만들고 싶습니다.Child 테마의 Style.css 및 functions.php
있는 style.css :
/*
Theme Name: Twenty Fifteen Child
Theme URI: http://localhost/wordpress-1/wp-content/themes/twentyfifteen-child/
Description: My first child theme, based on Twenty Fifteen
Author: Daniel Pataki
Author URI: http://danielpataki.com
Template: twentyfifteen
Version: 1.0.0
Tags: black, green, white, light, dark, two-columns, three-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready, responsive-layout, infinite-scroll, post-slider, design, food, journal, magazine, news, photography, portfolio, clean, contemporary, dark, elegant, modern, professional, sophisticated
Text Domain: twenty-fifteen-child
*/
기능 경로는 htdocs에/워드 프레스-1/WP - 콘텐츠/테마/twentyfifteen 자녀 그래서 여기에 비슷한 질문에 따라 아이의 코드를해야한다. PHP는 :
<?php
function enqueue_parent_styles() {
wp_enqueue_style('twentyfifteen-editor-style', get_template_directory_uri().'css/editor-style.css',array(), null, 'all');
wp_enqueue_style('twentyfifteen-ie', get_template_directory_uri().'css/ie.css',array(), null, 'all');
wp_enqueue_style('twentyfifteen-ie7', get_template_directory_uri().'css/editor-ie7.css',array(), null, 'all');
wp_enqueue_style('twentyfifteen-style', get_stylesheet_uri(), '', null, 'all');
}
add_action('wp_enqueue_scripts', 'enqueue_parent_styles');
?>
(스타일 시트) 부모 내용에 대한 경로 : 는 htdocs에/워드 프레스-1은 /는 WP - 콘텐츠/테마 미리보기가 twentyfifteen/CSS를 하지만 여전히 테마 선택 페이지에서 없다/아이의 헴과 테마를 로딩 할 때 부모 테마 (twentyfifteen)에서로드 된 CSS 규칙이 없습니다. 누군가가 나를 도울 수 있다면 문제를 찾을 수 없습니다.
WordPress 질문을위한 사이트가 있습니다. http://wordpress.stackexchange.com – mmm