質問編集履歴
3
コメントのエラーについても追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,10 +6,16 @@
|
|
6
6
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
|
9
|
+
####サイドバーが表示されない。
|
10
|
+
|
9
11
|
個別の記事ページにおいて、ページ上部に表示されるワードプレスツールバーとサイドバーが表示されなくなりました。恐らくこの記事を更新した直後ではないかと思います。
|
10
12
|
https://vwp789171.kagoyacloud.com/2019/04/03/line-pay/
|
11
13
|
トップページ、固定ページでは表示されます。
|
12
14
|
|
15
|
+
####コメントができない
|
16
|
+
|
17
|
+
コメントボタンを押しても何も起きません。
|
18
|
+
|
13
19
|
### 試したこと
|
14
20
|
|
15
21
|
COCOONからTwenty Nineteenなど元々備わっていた別のテーマにしたらサイドバーが復活しましたが…
|
2
single-contents.phpの中身を追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -81,4 +81,62 @@
|
|
81
81
|
|
82
82
|
<h2><?php the_field('title'); ?></h2>
|
83
83
|
|
84
|
-
<?php get_footer(); ?>
|
84
|
+
<?php get_footer(); ?>
|
85
|
+
|
86
|
+
single-contents.phpの中身
|
87
|
+
----------
|
88
|
+
<?php
|
89
|
+
/**
|
90
|
+
* Cocoon WordPress Theme
|
91
|
+
* @author: yhira
|
92
|
+
* @link: https://wp-cocoon.com/
|
93
|
+
* @license: http://www.gnu.org/licenses/gpl-2.0.html GPL v2 or later
|
94
|
+
*/
|
95
|
+
if ( !defined( 'ABSPATH' ) ) exit;
|
96
|
+
|
97
|
+
///////////////////////////////////////
|
98
|
+
// 投稿ページのコンテンツ
|
99
|
+
///////////////////////////////////////?>
|
100
|
+
<?php //パンくずリストがメイントップの場合
|
101
|
+
if (is_single_breadcrumbs_position_main_top()){
|
102
|
+
get_template_part('tmp/breadcrumbs');
|
103
|
+
} ?>
|
104
|
+
|
105
|
+
<?php //本文テンプレート
|
106
|
+
get_template_part('tmp/content') ?>
|
107
|
+
|
108
|
+
|
109
|
+
<div class="under-entry-content">
|
110
|
+
<?php get_template_part('tmp/related-entries'); //関連記事 ?>
|
111
|
+
|
112
|
+
<?php //関連記事下の広告表示
|
113
|
+
if (is_ad_pos_below_related_posts_visible() && is_all_adsenses_visible()){
|
114
|
+
get_template_part_with_ad_format(get_ad_pos_below_related_posts_format(), 'ad-below-related-posts', is_ad_pos_below_related_posts_label_visible());
|
115
|
+
}; ?>
|
116
|
+
|
117
|
+
<?php //投稿関連記事下ウイジェット
|
118
|
+
if ( is_active_sidebar( 'below-single-related-entries' ) ): ?>
|
119
|
+
<?php dynamic_sidebar( 'below-single-related-entries' ); ?>
|
120
|
+
<?php endif; ?>
|
121
|
+
|
122
|
+
<?php get_template_part('tmp/pager-post-navi'); //投稿ナビ ?>
|
123
|
+
|
124
|
+
<?php //コメントを表示する場合
|
125
|
+
if (is_single_comment_visible()) {
|
126
|
+
comments_template(); //コメントテンプレート
|
127
|
+
} ?>
|
128
|
+
|
129
|
+
<?php //コメントフォーム下ウイジェット
|
130
|
+
if ( is_active_sidebar( 'below-single-comment-form' ) ): ?>
|
131
|
+
<?php dynamic_sidebar( 'below-single-comment-form' ); ?>
|
132
|
+
<?php endif; ?>
|
133
|
+
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<?php //パンくずリストがメインボトムの場合
|
137
|
+
if (is_single_breadcrumbs_position_main_bottom()){
|
138
|
+
get_template_part('tmp/breadcrumbs');
|
139
|
+
} ?>
|
140
|
+
|
141
|
+
<?php //メインカラム追従領域
|
142
|
+
get_template_part('tmp/main-scroll'); ?>
|
1
single.phpの中身を追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -56,4 +56,29 @@
|
|
56
56
|
Lazy Load:0
|
57
57
|
WEBフォントLazy Load:0
|
58
58
|
|
59
|
-
利用中のプラグイン:
|
59
|
+
利用中のプラグイン:
|
60
|
+
|
61
|
+
single.phpの中身
|
62
|
+
---------
|
63
|
+
<?php //通常ページとAMPページの切り分け
|
64
|
+
/**
|
65
|
+
* Cocoon WordPress Theme
|
66
|
+
* @author: yhira
|
67
|
+
* @link: https://wp-cocoon.com/
|
68
|
+
* @license: http://www.gnu.org/licenses/gpl-2.0.html GPL v2 or later
|
69
|
+
*/
|
70
|
+
if ( !defined( 'ABSPATH' ) ) exit;
|
71
|
+
|
72
|
+
if (!is_amp()) {
|
73
|
+
get_header();
|
74
|
+
} else {
|
75
|
+
get_template_part('tmp/amp-header');
|
76
|
+
}
|
77
|
+
?>
|
78
|
+
|
79
|
+
<?php //投稿ページ内容
|
80
|
+
get_template_part('tmp/single-contents'); ?>
|
81
|
+
|
82
|
+
<h2><?php the_field('title'); ?></h2>
|
83
|
+
|
84
|
+
<?php get_footer(); ?>
|