質問編集履歴

1

header.phpを追記しました

2018/02/06 11:51

投稿

SeijiFukuda
SeijiFukuda

スコア17

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,181 @@
53
53
 
54
54
 
55
55
  お手数ですが、よろしくお願い致します。
56
+
57
+
58
+
59
+ ----追記分-----
60
+
61
+ header.phpの内容です。
62
+
63
+
64
+
65
+ ```php
66
+
67
+ <!DOCTYPE html>
68
+
69
+ <html <?php language_attributes(); ?> class="no-js">
70
+
71
+ <head>
72
+
73
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
74
+
75
+ <meta name="viewport" content="width=device-width, initial-scale=1">
76
+
77
+ <link rel="profile" href="http://gmpg.org/xfn/11">
78
+
79
+ <?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
80
+
81
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
82
+
83
+ <?php endif; ?>
84
+
85
+
86
+
87
+ <!-- OGP -->
88
+
89
+ <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
90
+
91
+ <title>
92
+
93
+ <?php
94
+
95
+ if ( is_front_page() && is_home() ) {
96
+
97
+ echo bloginfo('name') . bloginfo('description') ;
98
+
99
+ } else {
100
+
101
+ echo the_title();
102
+
103
+ }
104
+
105
+ ?>
106
+
107
+ </title>
108
+
109
+ <meta property="og:title" content="<?php the_title(); ?>" />
110
+
111
+ <meta property="og:type" content="website" />
112
+
113
+ <meta property="og:url" content="<?php echo the_permalink(); ?>" />
114
+
115
+ <meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
116
+
117
+ <meta property="og:description" content="<?php bloginfo('description'); ?>" />
118
+
119
+
120
+
121
+ <!-- Facebook用設定 -->
122
+
123
+ <meta property="fb:app_id" content="164153340876523" />
124
+
125
+
126
+
127
+ <!-- ※ Twitter共通設定 -->
128
+
129
+ <meta name="twitter:card" content="photo" />
130
+
131
+
132
+
133
+ <!-- OGP画像 -->
134
+
135
+ <?php get_template_part('inc/og-image'); ?>
136
+
137
+
138
+
139
+ <!-- jquery -->
140
+
141
+ <script src="https://code.jquery.com/jquery-2.2.3.js"></script>
142
+
143
+
144
+
145
+ <!-- css -->
146
+
147
+ <link href="<?php bloginfo('template_url'); ?>/css/normalize.css" rel="stylesheet" type="text/css">
148
+
149
+ <link href="<?php bloginfo('template_url'); ?>/css/common.css" rel="stylesheet" type="text/css">
150
+
151
+ <?php if( is_front_page() && is_home() ) { ?>
152
+
153
+ <link href="<?php bloginfo('template_url'); ?>/css/index.css" rel="stylesheet" type="text/css">
154
+
155
+ <?php } else { ?>
156
+
157
+
158
+
159
+ <?php } ?>
160
+
161
+
162
+
163
+ <!-- WEBフォント -->
164
+
165
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
166
+
167
+
168
+
169
+ <!-- 時間差でクラスを追加 -->
170
+
171
+ <script>
172
+
173
+  setTimeout(function(){
174
+
175
+  $(".ttl-area").addClass("anime");
176
+
177
+  },2500);
178
+
179
+ </script>
180
+
181
+
182
+
183
+ <!-- アナリティクス -->
184
+
185
+ <script
186
+
187
+ </script>
188
+
189
+
190
+
191
+ <!-- アドセンス -->
192
+
193
+ <script>
194
+
195
+ </script>
196
+
197
+
198
+
199
+ </head>
200
+
201
+
202
+
203
+ <body <?php body_class(); ?>>
204
+
205
+ <div class="ttl-area">
206
+
207
+ <div class="ttl-inner">
208
+
209
+ <h1>
210
+
211
+ <a href="<?php bloginfo('url'); ?>">
212
+
213
+ <img src="<?php bloginfo('template_url'); ?>/img/logo-h1.png" alt="<?php bloginfo('description'); ?>">
214
+
215
+ </a>
216
+
217
+ </h1>
218
+
219
+ <ul class="sns-btn">
220
+
221
+ <li><a href="https://twitter.com/basser45186053?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">Follow @basser45186053</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></li>
222
+
223
+ <li><div class="fb-like" data-href="https://www.facebook.com/basssoku/?ref=bookmarks" data-layout="button" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div></li>
224
+
225
+ <li></li>
226
+
227
+ </ul>
228
+
229
+ </div>
230
+
231
+ </div>
232
+
233
+ ```