I was just setting up a parent theme recently and needed to create a snippet for other theme authors to use. These two in combination will load the correct style.css files, and in the correct order (child being loaded after parent).
In your parent theme’s functions.php
file:
function wpse_175802_scripts() {
// Load our main stylesheet.
wp_enqueue_style( 'wpse-175802-style', get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'wpse_175802_scripts' );
In your child theme’s functions.php
file:
function wpse_175802_child_theme_scripts() {
wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'wpse_175802_child_theme_scripts' );
If you wanted the custom.css files loaded, keep them in the child_theme_scripts
function, following the same format as you used for the parent’s style.css
file.
Credit to the Codex and http://kovshenin.com/2014/child-themes-import/ for the original snippets.