ワードプレスのテーマ「SiteOrigin North」に子テーマを適用しようとしたがうまく動かなかった。
親テーマのstyle.min.cssの前に子テーマのstyle.cssが読み込まれてしまう。
いろいろ試したみた結果、functions.phpを以下のように変更したらできた。
/**
* Enqueue the parent theme stylesheet.
*/
function north_child_enqueue_parent_style() {
wp_enqueue_style( 'north-parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'north-child-style', get_stylesheet_uri(), array( 'north-parent-style' ),filemtime( get_theme_file_path( 'style.css' ) ));
}
add_action( 'wp_enqueue_scripts', 'north_child_enqueue_parent_style', 11 );
無理やりstyle.min.cssの後ろに読み込ませるようにしたけど、いいのかな?
とりあえず動いたのでこのままで様子をみるか。