child theme
-
Hello,
With child themes and in functions.php, when you add this wp_enqueue_style( ‘child-style’===> should child-style be the named of the folder of the child theme? i.e. should child-style be myfoo-style because the name of my child theme folder is called myfoo?
function my_theme_enqueue_styles() {
//$parent_style = ‘parent-style’; // This is ‘twentynineteen-style’ for the Twenty nineteen theme.
$parent_style = ‘twentynineteen-style’;
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’)
);
}add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
- The topic ‘child theme’ is closed to new replies.