質問編集履歴

3

コードの追加

2019/05/23 08:38

投稿

dogfood
dogfood

スコア19

test CHANGED
File without changes
test CHANGED
@@ -137,3 +137,233 @@
137
137
  </div>
138
138
 
139
139
  ```
140
+
141
+
142
+
143
+
144
+
145
+ CSSで編集することにしましたが、やはりうまく表示されません。
146
+
147
+ wordpressに打ち込んでいるHTML
148
+
149
+ ```
150
+
151
+ <div class="price-top site-blocks-cover inner-page" data-aos="fade" data-stellar-background-ratio="0.5">
152
+
153
+ <div class="row align-items-center justify-content-center">
154
+
155
+ <div class="col-md-7 text-center" data-aos="fade">
156
+
157
+ <h1>ご利用料金</h1>
158
+
159
+ <span class="caption d-block text-white">price menu</span>
160
+
161
+
162
+
163
+ </div>
164
+
165
+ </div>
166
+
167
+ </div>
168
+
169
+ ```
170
+
171
+
172
+
173
+ header.phpのhtml
174
+
175
+ ```
176
+
177
+ <!DOCTYPE html>
178
+
179
+ <html lang="ja">
180
+
181
+ <head>
182
+
183
+ <title><?php bloginfo('name'); ?> 麻布十番パーソナルジム 業界最安完全貸切ジム - 【ボディメイキングボックス】 <?php wp_title(); ?></title>
184
+
185
+ <meta charset="utf-8">
186
+
187
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
188
+
189
+
190
+
191
+ <link href="<?php bloginfo( 'stylesheet_directory' ); ?>/https://fonts.googleapis.com/css?family=Amatic+SC:400,700|Work+Sans:300,400,700" rel="stylesheet">
192
+
193
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/fonts/icomoon/style.css">
194
+
195
+
196
+
197
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/bootstrap.min.css">
198
+
199
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/magnific-popup.css">
200
+
201
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/jquery-ui.css">
202
+
203
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/owl.carousel.min.css">
204
+
205
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/owl.theme.default.min.css">
206
+
207
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/bootstrap-datepicker.css">
208
+
209
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/animate.css">
210
+
211
+
212
+
213
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/https://cdn.jsdelivr.net/npm/mediaelement@4.2.7/build/mediaelementplayer.min.css">
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/fonts/flaticon/font/flaticon.css">
222
+
223
+
224
+
225
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/aos.css">
226
+
227
+ <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_directory' ); ?>/css/myedit.css">
228
+
229
+
230
+
231
+
232
+
233
+ <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet">
234
+
235
+
236
+
237
+
238
+
239
+ <?php wp_head(); ?>
240
+
241
+ </head>
242
+
243
+ <body style="background-image: url('<?php bloginfo( 'stylesheet_directory' ); ?>/images/bg.jpg');">
244
+
245
+
246
+
247
+ <div class="site-wrap">
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+ <div class="site-mobile-menu">
256
+
257
+ <div class="site-mobile-menu-header">
258
+
259
+ <div class="site-mobile-menu-close mt-3">
260
+
261
+ <span class="icon-close2 js-menu-toggle"></span>
262
+
263
+ </div>
264
+
265
+ </div>
266
+
267
+ <div class="site-mobile-menu-body"></div>
268
+
269
+ </div> <!-- .site-mobile-menu -->
270
+
271
+
272
+
273
+
274
+
275
+ <div class="site-navbar-wrap js-site-navbar bg-white">
276
+
277
+
278
+
279
+ <div class="container">
280
+
281
+ <div class="site-navbar bg-light">
282
+
283
+ <div class="py-1">
284
+
285
+ <div class="row align-items-center">
286
+
287
+ <div class="col-2">
288
+
289
+ <h2 class="mb-0 site-logo"><a href="<?php bloginfo('url'); ?>/">BodyMaking<strong>Box</strong></a></h2>
290
+
291
+ </div>
292
+
293
+ <div class="col-10">
294
+
295
+ <nav class="site-navigation text-right" role="navigation">
296
+
297
+ <div class="container">
298
+
299
+ <div class="d-inline-block d-lg-none ml-md-0 mr-auto py-3"><a href="#" class="site-menu-toggle js-menu-toggle text-black"><span class="icon-menu h3"></span></a></div>
300
+
301
+
302
+
303
+ <ul class="site-menu js-clone-nav d-none d-lg-block">
304
+
305
+ <li class="has-children">
306
+
307
+ <a href="<?php bloginfo('url'); ?>/program">プログラム</a>
308
+
309
+ <ul class="dropdown arrow-top">
310
+
311
+ <li><a href="<?php bloginfo('url'); ?>/program#beginner/">初心者メニュー</a></li>
312
+
313
+ <li><a href="<?php bloginfo('url'); ?>/program#diet/">ダイエットメニュー</a></li>
314
+
315
+ <li><a href="<?php bloginfo('url'); ?>/program#powerup/">筋力アップメニュー</a></li>
316
+
317
+ </ul>
318
+
319
+ </li>
320
+
321
+ <?php wp_nav_menu( array(
322
+
323
+ 'theme_location'=>'place_global',
324
+
325
+ 'container' =>'',
326
+
327
+ 'menu_class' =>'',
328
+
329
+ 'items_wrap' => '%3$s',//<ul>を出力しない
330
+
331
+ ));
332
+
333
+ ?>
334
+
335
+ </ul>
336
+
337
+ </div>
338
+
339
+ </nav>
340
+
341
+ </div>
342
+
343
+ </div>
344
+
345
+ </div>
346
+
347
+ </div>
348
+
349
+ </div>
350
+
351
+ </div>
352
+
353
+
354
+
355
+ ```
356
+
357
+
358
+
359
+ 背景を読み込ませた、CSSファイル
360
+
361
+ ```CSS
362
+
363
+ .price-top{
364
+
365
+ background-image: url(/wp-content/themes/bodymakingbox/images/pricetop.jpeg);
366
+
367
+ }
368
+
369
+ ```

2

追加の情報

2019/05/23 08:38

投稿

dogfood
dogfood

スコア19

test CHANGED
File without changes
test CHANGED
@@ -79,3 +79,61 @@
79
79
 
80
80
 
81
81
  [images] フォルダはwp-contentのthemeに入れた自作テーマのフォルダに入っております。
82
+
83
+
84
+
85
+
86
+
87
+ 改めて下記のように打ち込んでおりますが、やはり表示ができません。
88
+
89
+ functions.php
90
+
91
+ ```php
92
+
93
+ function imagepassshort($arg) {
94
+
95
+ $content = str_replace('"images/', '"' . get_bloginfo('template_directory') . '/images/', $arg);
96
+
97
+ return $content;
98
+
99
+ }
100
+
101
+ add_action('the_content', 'imagepassshort');
102
+
103
+
104
+
105
+ function imagepassshortTemp($arg) {
106
+
107
+ return get_bloginfo('template_directory') . '/images/' . $arg;
108
+
109
+ }
110
+
111
+
112
+
113
+ ```
114
+
115
+
116
+
117
+ ワードプレス固定ページのHTML
118
+
119
+ ```HTML
120
+
121
+ <div class="site-blocks-cover inner-page" style="background-image: url(<?php echo imagepassshortTemp('pricetop.jpeg'); ?>);" data-aos="fade" data-stellar-background-ratio="0.5">
122
+
123
+ <div class="row align-items-center justify-content-center">
124
+
125
+ <div class="col-md-7 text-center" data-aos="fade">
126
+
127
+ <h1>ご利用料金</h1>
128
+
129
+ <span class="caption d-block text-white">price menu</span>
130
+
131
+
132
+
133
+ </div>
134
+
135
+ </div>
136
+
137
+ </div>
138
+
139
+ ```

1

URLの追加

2019/05/23 07:25

投稿

dogfood
dogfood

スコア19

test CHANGED
File without changes
test CHANGED
@@ -59,3 +59,23 @@
59
59
 
60
60
 
61
61
  ```
62
+
63
+
64
+
65
+
66
+
67
+ 固定ページのURLは、
68
+
69
+ wordpress/price/
70
+
71
+
72
+
73
+ 画像のURLは
74
+
75
+ images/pricetop.jpeg
76
+
77
+
78
+
79
+
80
+
81
+ [images] フォルダはwp-contentのthemeに入れた自作テーマのフォルダに入っております。