css 儿童主题 - 定期

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 儿童主题 - 定期相关的知识,希望对你有一定的参考价值。

<!--if your Parent Theme uses only one main style.css to hold all of the css. -->
<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
 
}
?>

<!--If your child theme style.css contains actual CSS code (as it normally does), you will need to enqueue it as well. -->
<?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')
    );
}
?>
/*
 Theme Name:   Twenty Fifteen Child
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfifteen
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/

以上是关于css 儿童主题 - 定期的主要内容,如果未能解决你的问题,请参考以下文章

css WordPress - 儿童主题 - style.css模板

css Divi(3.0.39) - 儿童主题 - style.css

css 儿童主题

css 儿童主题模板

css 儿童主题

css 儿童主题的例子