Twenty Thirteen uses wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri() );
in functions.php.
Wheter I use it or not use it in twentythirteen-child/functions.php the style.css from Child Theme is loaded (it is always loaded) and style.css from parent theme can never be loaded.
This is an exception to other files added via wp_enqueue_style()
, right? It doesn’t behave like all the other scripts and style files that are added with wp_enqueue_script()
.
So, I can’t load parent’s style.css in the child theme other than via @import
?
get_stylesheet_uri
will return the current theme’s stylesheet– the child stylesheet if it is a child theme. While not entirely clear from the Codex entry for that function, it is clear from the entry forget_stylesheet_directory_uri
, which is used byget_stylesheet_uri
. What should be happening is that the child stylesheet is beingenqueue
d twice under different slugs.To get the parent stylesheet you need to enqueue the parent sheet with
get_template_directory_uri
, which always returns the parent.