質問編集履歴
3
テーマヘッダーの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -33,3 +33,379 @@
|
|
33
33
|
検索しても、解決方法が紹介されているサイトがありません。
|
34
34
|
|
35
35
|
どうすれば良いのでしょうか。
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
### テーマヘッダー(header php)
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
<?php
|
44
|
+
|
45
|
+
/**
|
46
|
+
|
47
|
+
* header.php
|
48
|
+
|
49
|
+
*/
|
50
|
+
|
51
|
+
global $post;
|
52
|
+
|
53
|
+
$pid = "";
|
54
|
+
|
55
|
+
if ( isset( $post ) ) {
|
56
|
+
|
57
|
+
$pid = $post->ID;
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
?><!DOCTYPE html>
|
62
|
+
|
63
|
+
<html lang="ja"
|
64
|
+
|
65
|
+
class="<?php echo getPageLayout( $pid ); ?>"<?php if ( the_keni( 'gp_view' ) == "y" ) { ?> itemscope itemtype="http://schema.org/<?php echo getMicroCodeType(); ?>"<?php } ?>>
|
66
|
+
|
67
|
+
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
68
|
+
|
69
|
+
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
70
|
+
|
71
|
+
<script>
|
72
|
+
|
73
|
+
(adsbygoogle = window.adsbygoogle || []).push({
|
74
|
+
|
75
|
+
google_ad_client: "ca-pub-5918760080580616",
|
76
|
+
|
77
|
+
enable_page_level_ads: true
|
78
|
+
|
79
|
+
});
|
80
|
+
|
81
|
+
</script>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<title><% if:extra_title %><% extra_title %> - <% blog.title %><% /if %><% unless:extra_title %><% blog.title %><% /unless %></title>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<meta charset="UTF-8">
|
90
|
+
|
91
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
92
|
+
|
93
|
+
<?php if ( the_keni( 'mobile_layout' ) == "y" ) { ?>
|
94
|
+
|
95
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"><?php } ?>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<?php if ( ! the_keni( 'view_meta' ) ) { ?>
|
100
|
+
|
101
|
+
<?php if ( the_keni( 'view_meta_keyword' ) && the_keni( 'view_meta_keyword' ) == "y" ) { ?>
|
102
|
+
|
103
|
+
<meta name="keywords" content="<?php keyword_keni(); ?>">
|
104
|
+
|
105
|
+
<?php } ?>
|
106
|
+
|
107
|
+
<?php if ( the_keni( 'view_meta_description' ) && the_keni( 'view_meta_description' ) == "y" ) { ?>
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<meta name="description" content="<?php description_keni(); ?>">
|
112
|
+
|
113
|
+
<?php }
|
114
|
+
|
115
|
+
} elseif ( the_keni( 'view_meta' ) == "y" ) { ?>
|
116
|
+
|
117
|
+
<meta name="keywords" content="<?php keyword_keni(); ?>">
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<meta name="description" content="<?php description_keni(); ?>">
|
124
|
+
|
125
|
+
<?php }
|
126
|
+
|
127
|
+
wp_enqueue_script( 'jquery' );
|
128
|
+
|
129
|
+
if ( get_option( 'blog_public' ) != false ) {
|
130
|
+
|
131
|
+
echo getIndexFollow();
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
canonical_keni();
|
136
|
+
|
137
|
+
pageRelNext();
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
wp_head();
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
facebook_keni();
|
146
|
+
|
147
|
+
tw_cards_keni();
|
148
|
+
|
149
|
+
microdata_keni();
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
if ( function_exists( "get_site_icon_url" ) && get_site_icon_url() == "" ) { ?>
|
154
|
+
|
155
|
+
<link rel="shortcut icon" type="image/x-icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico">
|
156
|
+
|
157
|
+
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/images/apple-touch-icon.png">
|
158
|
+
|
159
|
+
<link rel="apple-touch-icon-precomposed"
|
160
|
+
|
161
|
+
href="<?php echo get_template_directory_uri(); ?>/images/apple-touch-icon.png">
|
162
|
+
|
163
|
+
<link rel="icon" href="<?php echo get_template_directory_uri(); ?>/images/apple-touch-icon.png">
|
164
|
+
|
165
|
+
<?php } ?>
|
166
|
+
|
167
|
+
<!--[if lt IE 9]>
|
168
|
+
|
169
|
+
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script><![endif]-->
|
170
|
+
|
171
|
+
<?php echo do_shortcode( the_keni( 'meta_text' ) ) . "\n";
|
172
|
+
|
173
|
+
if ( is_single() || is_page() ) {
|
174
|
+
|
175
|
+
echo get_post_meta( $pid, 'page_tags', true ) . "\n";
|
176
|
+
|
177
|
+
}
|
178
|
+
|
179
|
+
?>
|
180
|
+
|
181
|
+
</head>
|
182
|
+
|
183
|
+
<?php
|
184
|
+
|
185
|
+
$gnav = ( ( get_globalmenu_keni( 'top_menu' ) == "" ) || ( is_singular() && get_post_meta( $pid, 'menu_view', true ) == "n" ) ) ? "no-gn" : ""; // メニューを表示しない場合は、classにno-gnを設定する
|
186
|
+
|
187
|
+
// ランディングページで画像をフルサイズで表示する
|
188
|
+
|
189
|
+
if ( is_singular( LP_DIR ) && get_post_meta( $pid, 'fullscreen_view', true ) == "y" ) {
|
190
|
+
|
191
|
+
$gnav .= ( $gnav != "" ) ? " lp" : "lp"; ?>
|
192
|
+
|
193
|
+
<body <?php body_class( $gnav ); ?>>
|
194
|
+
|
195
|
+
<?php echo do_shortcode( the_keni( 'body_text' ) ) . "\n"; ?>
|
196
|
+
|
197
|
+
<div class="container">
|
198
|
+
|
199
|
+
<header id="top"
|
200
|
+
|
201
|
+
class="site-header full-screen"<?php if ( get_post_meta( $pid, 'header_image', true ) != "" ) { ?> style="background-image: url(<?php echo get_post_meta( $pid, 'header_image', true ); ?>)"<?php } ?>>
|
202
|
+
|
203
|
+
<div class="site-header-in">
|
204
|
+
|
205
|
+
<div class="site-header-conts">
|
206
|
+
|
207
|
+
<h1 class="site-title"><?php echo ( get_post_meta( $pid, 'page_h1', true ) ) ? esc_html( get_post_meta( $pid, 'page_h1', true ) ) : get_h1_keni(); ?></h1>
|
208
|
+
|
209
|
+
<?php echo get_post_meta( $pid, 'catch_text', true ) ? "<p class=\"lp-catch\">" . esc_html( get_post_meta( $pid, 'catch_text', true ) ) . "</p>" : ""; ?>
|
210
|
+
|
211
|
+
<p><a href="#main"><img
|
212
|
+
|
213
|
+
src="<?php echo get_template_directory_uri(); ?>/images/common/icon-arw-full-screen.png"
|
214
|
+
|
215
|
+
alt="メインへ" width="48" height="48"></a></p>
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
</header>
|
222
|
+
|
223
|
+
<?php
|
224
|
+
|
225
|
+
if ( strpos( $gnav, "no-gn" ) === false ) { ?>
|
226
|
+
|
227
|
+
<!--▼グローバルナビ-->
|
228
|
+
|
229
|
+
<nav class="global-nav">
|
230
|
+
|
231
|
+
<div class="global-nav-in">
|
232
|
+
|
233
|
+
<div class="global-nav-panel"><span class="btn-global-nav icon-gn-menu">メニュー</span></div>
|
234
|
+
|
235
|
+
<ul id="menu">
|
236
|
+
|
237
|
+
<?php echo get_globalmenu_keni( 'top_menu' ); ?>
|
238
|
+
|
239
|
+
</ul>
|
240
|
+
|
241
|
+
</div>
|
242
|
+
|
243
|
+
</nav>
|
244
|
+
|
245
|
+
<!--▲グローバルナビ-->
|
246
|
+
|
247
|
+
<?php }
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
// それ以外の場合
|
252
|
+
|
253
|
+
} else { ?>
|
254
|
+
|
255
|
+
<body <?php body_class( $gnav ); ?>>
|
256
|
+
|
257
|
+
<?php echo do_shortcode( the_keni( 'body_text' ) ) . "\n"; ?>
|
258
|
+
|
259
|
+
<div class="container">
|
260
|
+
|
261
|
+
<header id="top" class="site-header <?php if ( is_singular( LP_DIR ) ) {
|
262
|
+
|
263
|
+
echo 'normal-screen';
|
264
|
+
|
265
|
+
} ?>">
|
266
|
+
|
267
|
+
<div class="site-header-in">
|
268
|
+
|
269
|
+
<div class="site-header-conts">
|
270
|
+
|
271
|
+
<?php if ( is_singular( LP_DIR ) ) {
|
272
|
+
|
273
|
+
echo '<h1 class="site-title">';
|
274
|
+
|
275
|
+
echo get_h1_keni();
|
276
|
+
|
277
|
+
echo "</h1>\n";
|
278
|
+
|
279
|
+
echo ( get_post_meta( $pid, 'catch_text', true ) ) ? "<p class=\"lp-catch\">" . esc_html( get_post_meta( $pid, 'catch_text', true ) ) . "</p>\n" : ""; ?>
|
280
|
+
|
281
|
+
<?php } elseif ( is_front_page() ) { ?>
|
282
|
+
|
283
|
+
<h1 class="site-title"><a
|
284
|
+
|
285
|
+
href="<?php echo esc_url( home_url() ); ?>"><?php echo ( the_keni( 'site_logo' ) != "" ) ? "<img src=\"" . the_keni( 'site_logo' ) . "\" alt=\"" . esc_html( get_bloginfo( 'name' ) ) . "\" />" : esc_html( get_bloginfo( 'name' ) ); ?></a>
|
286
|
+
|
287
|
+
</h1>
|
288
|
+
|
289
|
+
<?php } else { ?>
|
290
|
+
|
291
|
+
<p class="site-title"><a
|
292
|
+
|
293
|
+
href="<?php echo esc_url( home_url() ); ?>"><?php echo ( the_keni( 'site_logo' ) != "" ) ? "<img src=\"" . the_keni( 'site_logo' ) . "\" alt=\"" . esc_html( get_bloginfo( 'name' ) ) . "\" />" : esc_html( get_bloginfo( 'name' ) ); ?></a>
|
294
|
+
|
295
|
+
</p>
|
296
|
+
|
297
|
+
<?php } ?>
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
</div>
|
302
|
+
|
303
|
+
<?php
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
if ( $gnav == "" ) { ?>
|
308
|
+
|
309
|
+
<!--▼グローバルナビ-->
|
310
|
+
|
311
|
+
<nav class="global-nav">
|
312
|
+
|
313
|
+
<div class="global-nav-in">
|
314
|
+
|
315
|
+
<div class="global-nav-panel"><span class="btn-global-nav icon-gn-menu">メニュー</span></div>
|
316
|
+
|
317
|
+
<ul id="menu">
|
318
|
+
|
319
|
+
<?php echo get_globalmenu_keni( 'top_menu' ); ?>
|
320
|
+
|
321
|
+
</ul>
|
322
|
+
|
323
|
+
</div>
|
324
|
+
|
325
|
+
</nav>
|
326
|
+
|
327
|
+
<!--▲グローバルナビ-->
|
328
|
+
|
329
|
+
<?php }
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
if ( is_front_page() && ( ! isset( $_GET['post_type'] ) || $_GET['post_type'] == "" ) ) {
|
334
|
+
|
335
|
+
$mainimage = the_keni( "mainimage" );
|
336
|
+
|
337
|
+
if ( ! empty( $mainimage ) ) {
|
338
|
+
|
339
|
+
?>
|
340
|
+
|
341
|
+
<div class="main-image">
|
342
|
+
|
343
|
+
<?php
|
344
|
+
|
345
|
+
if ( the_keni( "mainimage_posision" ) == "image" ) { ?>
|
346
|
+
|
347
|
+
<div class="main-image-in<?php if ( the_keni( 'mainimage_wide' ) == "y" ) { ?> wide<?php } ?>">
|
348
|
+
|
349
|
+
<img class="header-image" src="<?php echo esc_url( $mainimage ); ?>"
|
350
|
+
|
351
|
+
alt="<?php echo esc_html( the_keni( "mainimage_alt" ) ); ?>"/>
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
<?php } else { ?>
|
356
|
+
|
357
|
+
<div class="main-image-in-text<?php if ( the_keni( 'mainimage_wide' ) == "y" ) { ?> wide<?php } ?>"
|
358
|
+
|
359
|
+
style="background-image: url(<?php echo esc_url( $mainimage ); ?>);">
|
360
|
+
|
361
|
+
<div class="main-image-in-text-cont">
|
362
|
+
|
363
|
+
<?php if ( the_keni( "main_catchcopy" ) != "" ) { ?><p
|
364
|
+
|
365
|
+
class="main-copy"><?php echo esc_html( the_keni( "main_catchcopy" ) ); ?></p><?php } ?>
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
<?php if ( the_keni( "sub_catchcopy" ) != "" ) { ?><p
|
370
|
+
|
371
|
+
class="sub-copy"><?php echo esc_html( the_keni( "sub_catchcopy" ) ); ?></p><?php } ?>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<?php if ( the_keni( "free_catchcopy" ) != "" ) {
|
376
|
+
|
377
|
+
echo "<div class=\"main-image-in-text-box\">\n" . the_keni( "free_catchcopy" ) . "\n</div>\n";
|
378
|
+
|
379
|
+
} ?>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
</div>
|
384
|
+
|
385
|
+
</div>
|
386
|
+
|
387
|
+
<?php }
|
388
|
+
|
389
|
+
?>
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
<?php
|
394
|
+
|
395
|
+
} elseif ( the_keni( "mainimage_posision" ) != "image" ) { ?>
|
396
|
+
|
397
|
+
<div class="main-image-in-text<?php if ( the_keni( 'mainimage_wide' ) == "y" ) { ?> wide<?php } ?>"
|
398
|
+
|
399
|
+
style="background-color: #<?php echo the_keni( 'mainimage_bg_color' ); ?>;">
|
400
|
+
|
401
|
+
<div class="main-image-in-text-cont">
|
402
|
+
|
403
|
+
<?php if ( the_keni( "main_catchcopy" ) != "" ) { ?><p
|
404
|
+
|
405
|
+
class="main-copy"><?php echo esc_html( the_keni( "main_catchcopy" ) ); ?></p><?php } ?>
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
<?php if ( the_keni(
|
410
|
+
|
411
|
+
以下、文字数により略。
|
2
プラグインの有無、使用しているテーマについての補足
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,6 +7,12 @@
|
|
7
7
|
タイトルバーと、検索結果で表示されるものが、意図したものになりません。
|
8
8
|
|
9
9
|
タイトルバーと検索結果を「記事タイトル ブログタイトル」にしたいのですが、どうすれば良いのでしょうか。
|
10
|
+
|
11
|
+
プラグインは、使っていません。
|
12
|
+
|
13
|
+
ブログのテーマは、賢威7です。
|
14
|
+
|
15
|
+
少し前までは、All in One SEO Packを使用していましたが、賢威7との相性が悪いので、消しました。
|
10
16
|
|
11
17
|
タイトルバーに表示されるものは、以下の冒頭部分です。
|
12
18
|
|
1
内容、タイトルの補足
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
タイトルバー
|
1
|
+
タイトルバーと検索結果を「記事タイトル ブログタイトル」にしたい。
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
### タイトルバーと検索結果を「記事タイトル ブログタイトル」にしたい。
|
2
2
|
|
3
|
-
|
3
|
+
(HTML,ワードプレス初心者です)
|
4
4
|
|
5
5
|
ワードプレスを使って、ブログを書いています。
|
6
6
|
|