Why does my child theme CSS get called twice?
-
Has anyone else noticed this?
What I added to the function.php is –add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
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’)
);
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Why does my child theme CSS get called twice?’ is closed to new replies.