Title: Flexible theme Multiple CSS Enqueue for Child Theme
Last modified: August 22, 2016

---

# Flexible theme Multiple CSS Enqueue for Child Theme

 *  [mhensler](https://wordpress.org/support/users/mhensler/)
 * (@mhensler)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/theme-flexible-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?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747644)
 * Elegant Themes is the ones to ask about this – these forums don’t support commercial
   themes, sorry.
 *  [InHouse](https://wordpress.org/support/users/inhouse/)
 * (@inhouse)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747818)
 * @wpyohi the OP had a pretty generic question but just so happens to use a commercial
   theme. The root of the question is how to enqueue multiple stylesheets from a
   parent theme. I found this thread from a Google search and figured this out from
   another thread. I don’t know exactly why this works but in case this helps anyone,
   it appears 2 enqueues can’t be “named” the same. ‘parent-style’ and ‘parent-mediaqueries’
   worked for my situation.
 *     ```
       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-mediaqueries', get_template_directory_uri() . '/mediaqueries.css', array(), '' );
           wp_enqueue_style( 'child-style',
               get_stylesheet_directory_uri() . '/style.css',
               array('parent-style')
           );
       }
       ```
   
 *  [Noodles](https://wordpress.org/support/users/snugbabyshop/)
 * (@snugbabyshop)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747819)
 * Thanks inhouse! Yes, I agree that this a generic question for which I could not
   find a proper answer until now. Cheers!
 *  [Heidi-Philtre](https://wordpress.org/support/users/heidi-philtre/)
 * (@heidi-philtre)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747831)
 * Same here — very helpful. Thank you!
 *  [Saiqua](https://wordpress.org/support/users/saiqua/)
 * (@saiqua)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747839)
 * I’m having the same issue – can someone please explain it a little bit to me?
   I’m learning as I go and i think I’m having trouble understanding the syntax 
   in relation to this. Basically, I want to make changes in the parent css files
   and upload the changes in the child. Please help! I’m providing a link of to 
   a screenshot of my screen. (Caution: might look super dumb!)
 * [https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/12022597_10153276779562858_8231746904147172687_o.jpg](https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/t31.0-8/12022597_10153276779562858_8231746904147172687_o.jpg)
 *  [rememberanytime](https://wordpress.org/support/users/rememberanytime/)
 * (@rememberanytime)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747840)
 * Hello Inhouse,
    I am trying to cheate a child theme for twentyfifteen which has
   3 css files. I tried your way of enqueueing but am not able to generate my child
   theme. Could you please help me identify my errors Here goes the functions.PHP
   of my- twentyfifteen-child
 *     ```
       <?php
       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-mediaqueries', get_template_directory_uri() . '/mediaqueries.css', array(),'');
       	wp_enqueue_style( 'child-style',
           	get-stylesheet-directory-uri(). '/style.css',
       	    array( 'parent-style' )
       	);
   
       }
       ```
   
 *  [InHouse](https://wordpress.org/support/users/inhouse/)
 * (@inhouse)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747841)
 * I’m thinking you may have issues with your stylesheet header which names your
   child theme and determines whether it is a child of another theme. Have you read
   through the [child theme docs in Codex](https://codex.wordpress.org/Child_Themes)?
   What do you see in Appearance > Themes?
 *     ```
       /*
        Theme Name:   Twenty Fifteen Child
        Theme URI:    http://example.com/twenty-fifteen-child/
        Description:  Twenty Fifteen Child Theme
        Author:       John Doe
        Author URI:   http://example.com
        Template:     twentyfifteen
        Version:      1.0.0
        License:      GNU General Public License v2 or later
        License URI:  http://www.gnu.org/licenses/gpl-2.0.html
        Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
        Text Domain:  twenty-fifteen-child
       */
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Flexible theme Multiple CSS Enqueue for Child Theme’ is closed to new
replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [enqueue](https://wordpress.org/support/topic-tag/enqueue/)
 * [get_template_directory_uri](https://wordpress.org/support/topic-tag/get_template_directory_uri/)
 * [parent theme](https://wordpress.org/support/topic-tag/parent-theme/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)
 * [wp_enqueue_style()](https://wordpress.org/support/topic-tag/wp_enqueue_style/)

 * 7 replies
 * 7 participants
 * Last reply from: [InHouse](https://wordpress.org/support/users/inhouse/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/theme-flexible-multiple-css-enqueue-for-child-theme/#post-5747841)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
