I am putting together a wordpress child theme based on a parent theme that has multiple style sheets in it’s directory. So for example this is the navigation to a few of the style sheets:

  • parent-theme/style.css
  • parent-theme/css/style.css
  • parent-theme/css/bootstrap.css

I created my child folder and created my style.css file as well as my function.php file but it seems that the child theme is only pulling the style sheet for the parent-theme/style.css file and not pulling all the .css files.

After doing some digging this is where my functions.php file is at currently:

<?php

/* v1.0.5
Date: 5/15/17
*/


function my_theme_enqueue_styles() {

$parent_style = 'wizard-style'; // This is 'wizard' for the Wizard theme.

wp_enqueue_style( $parent_style, get_template_directory_uri() . 'style.css' );
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/css/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' );
?>

My main objective is to have the child theme pull all needed stylesheets and utilize the one single style sheet under my child them folder (child-theme/style.css) for any changes I would like to make.

My questions are:

  1. Is this possible?

    • If it is possible, what errors may be occurring that is causing my fucntion.php file not to pull all the stylesheets?
    • If it is not possible, what changes do I need to make to my function.php file and my directory to make this work?

Read more here: WordPress Child Theme Needs to pull Multiple style sheets form Parent


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: