前提・実現したいこと
wordpressの子テーマで複数のCssを読み込むようにカスタマイズを行いたいのですが、funtions.phpでの指定の仕方がわからずご教示いただければと思います。
親テーマのhoge.CSSのStyleを上書きしたい
親テーマファイル
テーマ名/style.css
テーマ名/css/hoge.css
子テーマファイル
チルドテーマ/style.css
チルドテーマ/css/hoge.css
functions.php
function skin_child_theme_enqueue_scripts() { wp_enqueue_style( 'hoge_child',get_template_directory_uri() . '/style.css',array( 'hoge_main' ),wp_get_theme()->get('01')); wp_enqueue_style( 'hoge_child',get_template_directory_uri() . '/css/hoge.css' ,array( 'hoge_main' ),wp_get_theme()->get('01')); } add_action( 'wp_enqueue_scripts', 'skin_child_theme_enqueue_scripts' );
よろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。