質問編集履歴
1
文言修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,17 +12,53 @@
|
|
12
12
|
|
13
13
|
```ここに言語を入力
|
14
14
|
|
15
|
+
/*********************
|
16
|
+
|
17
|
+
CSS
|
18
|
+
|
19
|
+
*********************/
|
20
|
+
|
15
21
|
function register_style() {
|
16
22
|
|
17
|
-
wp_register_style('
|
23
|
+
wp_register_style('style', get_bloginfo('template_directory').'/style.css');
|
18
24
|
|
25
|
+
wp_register_style('woocommerce', get_bloginfo('template_directory').'/woocommerce/assets/css/woocommerce.css');
|
19
26
|
|
27
|
+
wp_register_style('woocommerce-layout', get_bloginfo('template_directory').'/woocommerce/assets/css/woocommerce-layout.css');
|
20
28
|
|
29
|
+
wp_register_style('shortcode', get_bloginfo('template_directory').'/library/css/shortcode.css');
|
30
|
+
|
31
|
+
wp_register_style('slider', get_bloginfo('template_directory').'/library/css/bx-slider.css');
|
32
|
+
|
33
|
+
if(!get_option( 'side_options_animatenone' )){
|
34
|
+
|
35
|
+
wp_register_style('animate', get_bloginfo('template_directory').'/library/css/animate.min.css');
|
36
|
+
|
37
|
+
}
|
38
|
+
|
39
|
+
wp_register_style('lp_css', get_bloginfo('template_directory').'/library/css/lp.css');
|
40
|
+
|
41
|
+
}
|
42
|
+
|
21
|
-
function add_stylesheet() {
|
43
|
+
function add_stylesheet() {
|
22
44
|
|
23
45
|
register_style();
|
24
46
|
|
47
|
+
wp_enqueue_style('style');
|
48
|
+
|
49
|
+
wp_enqueue_style('woocommerce');
|
50
|
+
|
25
51
|
wp_enqueue_style('woocommerce-layout');
|
52
|
+
|
53
|
+
wp_enqueue_style('slider');
|
54
|
+
|
55
|
+
wp_enqueue_style('animate');
|
56
|
+
|
57
|
+
wp_enqueue_style('shortcode');
|
58
|
+
|
59
|
+
if(is_singular( 'post_lp' )) {
|
60
|
+
|
61
|
+
wp_enqueue_style('lp_css');
|
26
62
|
|
27
63
|
}
|
28
64
|
|
@@ -38,6 +74,8 @@
|
|
38
74
|
|
39
75
|
|
40
76
|
|
77
|
+
|
78
|
+
|
41
79
|
■同じような記述で読み込んでいるCSSファイルもある
|
42
80
|
|
43
81
|
|
@@ -47,36 +85,6 @@
|
|
47
85
|
"/www/hogehoge/wp-content/themes/themename/woocommerce/assets/css/woocommerce.css"
|
48
86
|
|
49
87
|
|
50
|
-
|
51
|
-
■themename/functions.phpに記述したコード
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
```ここに言語を入力
|
56
|
-
|
57
|
-
function register_style() {
|
58
|
-
|
59
|
-
wp_register_style('woocommerce-layout', get_bloginfo('template_directory').'/woocommerce/assets/css/woocommerce.css'); }
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
function add_stylesheet() {
|
64
|
-
|
65
|
-
register_style();
|
66
|
-
|
67
|
-
wp_enqueue_style('woocommerce');
|
68
|
-
|
69
|
-
}
|
70
|
-
|
71
|
-
elseif (is_home() || is_front_page()) {
|
72
|
-
|
73
|
-
}
|
74
|
-
|
75
|
-
}
|
76
|
-
|
77
|
-
add_action('wp_print_styles', 'add_stylesheet');
|
78
|
-
|
79
|
-
```
|
80
88
|
|
81
89
|
|
82
90
|
|