質問編集履歴

2

function\.php編集

2017/07/17 02:14

投稿

sugishio
sugishio

スコア47

test CHANGED
File without changes
test CHANGED
@@ -34,8 +34,6 @@
34
34
 
35
35
  function add_files($style) {
36
36
 
37
- $style = ['reset', 'myCommon', 'index'];
38
-
39
37
  foreach ($style as $item) {
40
38
 
41
39
  wp_register_style($item, get_stylesheet_directory_uri().'/assets/css/'.$item.'.css');

1

function\.php内更新

2017/07/17 02:14

投稿

sugishio
sugishio

スコア47

test CHANGED
File without changes
test CHANGED
@@ -34,9 +34,13 @@
34
34
 
35
35
  function add_files($style) {
36
36
 
37
+ $style = ['reset', 'myCommon', 'index'];
38
+
37
39
  foreach ($style as $item) {
38
40
 
39
- wp_enqueue_style('style', get_stylesheet_directory_uri() . '/assets/css/' . $item . '.css');
41
+ wp_register_style($item, get_stylesheet_directory_uri().'/assets/css/'.$item.'.css');
42
+
43
+ wp_enqueue_style($item);
40
44
 
41
45
  }
42
46