Software Development Engineering/Wordpress
How to include styles in Wordpress Child Themes (워드프레스 차일드테마 css 스타일 적용)
devxpert.yoon
2021. 2. 14. 01:55
728x90
반응형
function.php
if ( ! function_exists('child_theme_enqueue_scripts') ) {
function child_theme_enqueue_scripts() {
$parent_style = 'parent-theme';
wp_enqueue_style('child-theme', get_stylesheet_directory_uri() . '/style.css', array($parent_style));
}
add_action('wp_enqueue_scripts', 'child_theme_enqueue_scripts');
}
style.css
/*
Theme Name: child-theme
Description: A child theme of Parent Theme
Author: Theme Creator
Version: 1.0.1
Template: parent-theme
*/
/* Tablet */
@media (max-width: 768px) {
}
/* Mobile */
@media (max-width: 480px) {
}
728x90
반응형