質問編集履歴
2
index.php、画像を削除した時にheaderタグが消えてしまうため修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,7 +82,9 @@
|
|
82
82
|
|
83
83
|
```php
|
84
84
|
|
85
|
+
<?php if ( get_the_header_img_url() ) : ?>
|
86
|
+
|
85
|
-
<header style="
|
87
|
+
<header style="
|
86
88
|
|
87
89
|
background:url(<?php echo get_the_header_img_url(); ?>);
|
88
90
|
|
@@ -96,4 +98,10 @@
|
|
96
98
|
|
97
99
|
">
|
98
100
|
|
101
|
+
<?php else : ?>
|
102
|
+
|
103
|
+
<header>
|
104
|
+
|
105
|
+
<?php endif; ?>
|
106
|
+
|
99
107
|
```
|
1
出力時のhtmlとcssを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,6 +82,18 @@
|
|
82
82
|
|
83
83
|
```php
|
84
84
|
|
85
|
+
<header style="
|
86
|
+
|
85
|
-
<?php echo get_the_header_img_url(); ?>
|
87
|
+
background:url(<?php echo get_the_header_img_url(); ?>);
|
88
|
+
|
89
|
+
background-position: center -300px;
|
90
|
+
|
91
|
+
background-repeat: no-repeat;
|
92
|
+
|
93
|
+
background-size: cover;
|
94
|
+
|
95
|
+
background-attachment: fixed;
|
96
|
+
|
97
|
+
">
|
86
98
|
|
87
99
|
```
|