Enfileire também o style.css
e defina normalize
como dependência:
if ( ! is_admin() )
{
// Register early, so no on else can reserve that handle
add_action( 'wp_loaded', function()
{
wp_register_style(
'normalize',
// parent theme
get_template_directory_uri() . '/css/normalize.css'
);
wp_register_style(
'theme_name',
// current theme, might be the child theme
get_stylesheet_uri(), [ 'normalize' ]
);
});
add_action( 'wp_enqueue_scripts', function()
{
wp_enqueue_style( 'theme_name' );
});
}
WordPress carregará as dependências agora primeiro automaticamente quando theme_name
for impresso.