Loading additional css files into a child theme
-
I’ve created a folder for my child theme which have functions.php and style.css. I have corrected the php file to load the child style.css file successfully. The issue is that the theme I am using has the bulk of the styles loading from a file called theme.css in the parent directory. I read a few topics here and none solve my problem. I am not a coder, I work by trial and error, and while I know that’s stupid, it is how things are.
<?php add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); function my_theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'polmo-theme', get_template_directory_uri() . '/assets/css/theme.css' ); } ?>
- The topic ‘Loading additional css files into a child theme’ is closed to new replies.