質問編集履歴
1
functions.phpの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -172,6 +172,84 @@
|
|
172
172
|
|
173
173
|
|
174
174
|
|
175
|
+
また、functions.phpは以下の通りです。
|
176
|
+
|
177
|
+
```PHP
|
178
|
+
|
179
|
+
<?php
|
180
|
+
|
181
|
+
// This function enqueues the Normalize.css for use. The first parameter is a name for the stylesheet, the second is the URL. Here we
|
182
|
+
|
183
|
+
// use an online version of the css file.
|
184
|
+
|
185
|
+
function add_normalize_CSS() {
|
186
|
+
|
187
|
+
wp_enqueue_style( 'normalize-styles', "https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css");
|
188
|
+
|
189
|
+
}
|
190
|
+
|
191
|
+
// Register a new sidebar simply named 'sidebar'
|
192
|
+
|
193
|
+
function add_widget_Support() {
|
194
|
+
|
195
|
+
register_sidebar( array(
|
196
|
+
|
197
|
+
'name' => 'Sidebar',
|
198
|
+
|
199
|
+
'id' => 'sidebar',
|
200
|
+
|
201
|
+
'before_widget' => '<div>',
|
202
|
+
|
203
|
+
'after_widget' => '</div>',
|
204
|
+
|
205
|
+
'before_title' => '<h2>',
|
206
|
+
|
207
|
+
'after_title' => '</h2>',
|
208
|
+
|
209
|
+
) );
|
210
|
+
|
211
|
+
}
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
// Hook the widget initiation and run our function
|
226
|
+
|
227
|
+
add_action( 'widgets_init', 'add_Widget_Support' );
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
// Register a new navigation menu
|
232
|
+
|
233
|
+
function add_Main_Nav() {
|
234
|
+
|
235
|
+
register_nav_menu('header-menu',__( 'Header Menu' ));
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
// Hook to the init action hook, run our navigation menu function
|
240
|
+
|
241
|
+
add_action( 'init', 'add_Main_Nav' );
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
?>
|
248
|
+
|
249
|
+
```
|
250
|
+
|
251
|
+
|
252
|
+
|
175
253
|
### php化する際に参考にしたサイト
|
176
254
|
|
177
255
|
[How to Create a WordPress Theme Using HTML5, CSS3, and Responsive Design Principles](https://www.hostinger.com/tutorials/create-wordpress-theme-html5#indexphp)
|