It seems that I should have used not get_stylesheet_directory() but get_stylesheet_directory_uri().
function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style' , get_stylesheet_directory_uri() . '/style.css', array('parent-style') );
The html file generated is: (note: spaces added to enhance readability.)
48 <link rel='stylesheet' id='parent-style-css' href='https://spinorlab.matrix.jp/en/wp-content/themes/twentyseventeen/ style.css?ver=2017-08-03-Thu-00:25:48' type='text/css' media='all' /> 49 <link rel='stylesheet' id='child-style-css' href='https://spinorlab.matrix.jp/en/wp-content/themes/twentyseventeen-child/style.css?ver=2017-08-03-Thu-00:25:48' type='text/css' media='all' /> 51 <link rel='stylesheet' id='twentyseventeen-style-css' href='https://spinorlab.matrix.jp/en/wp-content/themes/twentyseventeen-child/style.css?ver=2017-08-03-Thu-00:25:48' type='text/css' media='all' />
We don’t need two same lines, 49 and 51, and giving the same timestamp for two different style files, parent and child, doesn’t look nice, I must admit.