質問編集履歴
3
コードを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -93,3 +93,77 @@
|
|
93
93
|
add_action( 'widgets_init', 'mytheme_widgets');
|
94
94
|
|
95
95
|
```
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
```style.css
|
100
|
+
|
101
|
+
/* サイドメニュー */
|
102
|
+
|
103
|
+
aside {
|
104
|
+
|
105
|
+
grid-row: aside;
|
106
|
+
|
107
|
+
display: grid;
|
108
|
+
|
109
|
+
grid-row-gap: 30px;
|
110
|
+
|
111
|
+
row-gap: 30px;
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
section {
|
118
|
+
|
119
|
+
border: solid 1px #ddd;
|
120
|
+
|
121
|
+
padding: 15px;
|
122
|
+
|
123
|
+
box-shadow: 0 3px 5px #ddd;
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
section h2 {
|
130
|
+
|
131
|
+
border-bottom: solid 1px #ddd;
|
132
|
+
|
133
|
+
padding-bottom: 20px;
|
134
|
+
|
135
|
+
margin-bottom: 30px;
|
136
|
+
|
137
|
+
font-size: var(--f4);
|
138
|
+
|
139
|
+
font-weight: normal;
|
140
|
+
|
141
|
+
color: #1b5e92;
|
142
|
+
|
143
|
+
text-align: center;
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
section ul {
|
150
|
+
|
151
|
+
padding: 0;
|
152
|
+
|
153
|
+
list-style-type: none;
|
154
|
+
|
155
|
+
font-size: var(--f6);
|
156
|
+
|
157
|
+
display: grid;
|
158
|
+
|
159
|
+
grid-row-gap: 15px;
|
160
|
+
|
161
|
+
row-gap: 15px;
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
```
|
2
コードの編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,9 @@
|
|
66
66
|
|
67
67
|
|
68
68
|
|
69
|
+
|
70
|
+
|
69
|
-
``functions.php
|
71
|
+
```functions.php
|
70
72
|
|
71
73
|
function mytheme_widgets() {
|
72
74
|
|
1
コードを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -43,3 +43,51 @@
|
|
43
43
|
どなたかご教授いただけると幸いです。
|
44
44
|
|
45
45
|
よろしくお願いいたします。
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
```sidebar.php
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
<?php if ( is_active_sidebar( 'sidebar-1' )): ?>
|
54
|
+
|
55
|
+
<aside>
|
56
|
+
|
57
|
+
<?php dynamic_sidebar( 'sidebar-1'); ?>
|
58
|
+
|
59
|
+
</aside>
|
60
|
+
|
61
|
+
<?php endif; ?>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
``functions.php
|
70
|
+
|
71
|
+
function mytheme_widgets() {
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
register_sidebar( array (
|
76
|
+
|
77
|
+
'id' => 'sidebar-1',
|
78
|
+
|
79
|
+
'name' => 'サイドメニュー',
|
80
|
+
|
81
|
+
'before_widget' => '<section id="%1$s" class="widget %2$s">',
|
82
|
+
|
83
|
+
'after_widget' => '</section>'
|
84
|
+
|
85
|
+
));
|
86
|
+
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
add_action( 'widgets_init', 'mytheme_widgets');
|
92
|
+
|
93
|
+
```
|