enqueue styles for parent theme too
This commit is contained in:
parent
e58be7fc2d
commit
c9ee301100
1 changed files with 23 additions and 0 deletions
23
functions.php
Normal file
23
functions.php
Normal 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' );
|
||||
|
||||
|
||||
?>
|
Loading…
Reference in a new issue