Flexible theme Multiple CSS Enqueue for Child Theme
-
So, I’m attempting to make a child theme based of the Flexible Theme from Elegant Themes. However, the parent theme has multiple style sheets. One style.css in the root folder, and four more in the “css” folder off the root.
I created a new template folder on the server and uploaded a modified style.css (it shows up in the appearance panel), and a functions.php. However, the latter is tripping me up.
First question is how should the php look if I have several style sheets to reference?
Like this ?
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/css/secondstyle.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/css/thirdstyle.css' ); }
If so, the directory is always listed as starting with a “/.” However, if my parent theme is in a folder outside of my child theme’s folder, doesn’t the directory have to be more specific?
- The topic ‘Flexible theme Multiple CSS Enqueue for Child Theme’ is closed to new replies.