enqueue styles for parent theme too

This commit is contained in:
Evan Mullins 2019-03-08 08:36:23 -07:00
parent e58be7fc2d
commit c9ee301100

23
functions.php Normal file
View file

@ -0,0 +1,23 @@
<?php
// Enqueue styles - get parent theme styles first.
function my_theme_enqueue_styles() {
$parent_style = 'parent-style'; // This is 'twentynineteen-style' for the Twenty Nineteen 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')
);
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
// theme mods
// set_theme_mod( 'page_layout', 'one-column' );
?>