投稿した詳細画面がフッターより下にリピートされる
-
<?php if(is_mobile()) { ?>
スマホ
<?php } else { ?>
PCとタブレット
<?php } ?>上記のタグで「single.php」の表示を「スマホ」と「PC・タブレット」で表示分けしており、
ブログのカテゴリで「イベント」「ブログ」というカテゴリ選択した場合に、IDで表示をふりわけております。「single_event.php」「single_blog.php」振り分けは問題なくいっているのですが、記事詳細の画面にはいった際に
記事が正規の部分に表示されているのですが、なぜか下の方に、同じものが表示されています。
フッター記載の「<?php wp_footer(); ?>」よりも下に…
記事の呼び出し方がわるいのでしょうか。どなたかご教授いただければと思います。ちなみ記事詳細の呼び出しは、元の「single.php」を流用したつもりなのですが 以下コードです。
「single_blog.php」のコード内です。
<?php if(is_mobile()) { ?><?php get_header(smp); ?>
<link href=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/smp/css/blog.css” rel=”stylesheet” media=”all” type=”text/css” /><!– メイン画像 –>
<div id=”main_img”><img src=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/smp/img/blog/main_img01.jpg” alt=”カレッジBLOG” width=”100%” /></div>
<!– メイン画像 –><!– ぱんくず –>
<div id=”pankuzu”>現在のページ:HOME > ブログ一覧 > ブログ詳細</div>
<!– ぱんくず –><div class=”tit_green”><h2>BLOG</h2></div>
<div class=”blog_set”>
<!– ブログ一覧 –>
<div class=”blog_box”>
<div class=”blog_tit”><?php the_title(); ?></div>
<div class=”blog_day”><?php the_time(“Y年m月j日”) ?></div>
<div class=”blog_txt”><div id=”main-content” class=”main-content”>
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( ‘featured-content’ );
}
?>
<div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”><?php
// Start the Loop.
while ( have_posts() ) : the_post();// Include the page content template.
get_template_part( ‘content’, ‘page’ );// If comments are open or we have at least one comment, load up the comment template.
//if ( comments_open() || get_comments_number() ) {
// comments_template();
//}
endwhile;
?></div><!– #content –>
</div><!– #primary –>
</div><!– #main-content –></div>
</div><!—blog_box–>
<!– ブログ一覧 –>
<div class=”pager_box”>
<div class=”previous”><?php previous_post_link(‘%link’, ‘<img src=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/smp/img/blog/blog_next.jpg” width=”40px” />’, TRUE, ”); ?></div>
<div class=”next”><?php next_post_link(‘%link’, ‘<img src=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/smp/img/blog/blog_back.jpg” width=”40px” />’, TRUE, ”); ?></div>
<div class=”cl_box”><hr /></div>
</div></div>
<?php get_footer(smp); ?><?php } else { ?>
<?php get_header(blog_single); ?>
<link href=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/css/blog.css” rel=”stylesheet” media=”all” type=”text/css” />
<!– コンテンツ –>
<div id=”contents”>
<!– コンテンツ 左 –>
<div id=”left_box”><div id=”blog_box”>
<div class=”tit_box_gre mb15″ id=”greet_top”><h2>カレッジBLOG</h2></div><div class=”blog_article”>
<div class=”blog_head”>
<div class=”blog_tit”><?php the_title(); ?></div>
<div class=”blog_day”><?php the_time(“Y年m月j日”) ?></div>
<div class=”cl_box”><hr /></div>
</div><div class=”blog_txtbox”>
<div id=”main-content” class=”main-content”>
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
// Include the featured content template.
get_template_part( ‘featured-content’ );
}
?>
<div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”><?php
// Start the Loop.
while ( have_posts() ) : the_post();// Include the page content template.
get_template_part( ‘content’, ‘page’ );// If comments are open or we have at least one comment, load up the comment template.
//if ( comments_open() || get_comments_number() ) {
// comments_template();
//}
endwhile;
?></div><!– #content –>
</div><!– #primary –>
</div><!– #main-content –></div>
</div><!–blog_article–><div class=”pager_box”>
<div class=”previous”><?php previous_post_link(‘%link’, ‘<img src=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/img/blog/blog_next.jpg” />’, TRUE, ”); ?></div>
<div class=”next”><?php next_post_link(‘%link’, ‘<img src=”http://◯◯◯◯◯.◯◯.jp/page/wp-content/themes/twentyfourteen/img/blog/blog_back.jpg” />’, TRUE, ”); ?></div>
<div class=”cl_box”><hr /></div>
</div></div><!–blog_box–>
</div><!–left_box–>
<!– コンテンツ 左 –>
<!– コンテンツ 右 –>
<div id=”right_box”>
<?php get_sidebar( ‘content’ ); ?>
</div><!–right_box–>
<!– コンテンツ 右 –>
<div class=”cl_box”><hr /></div>
</div><!–contents–>
<!– コンテンツ –><?php get_footer(); ?>
<?php } ?>
- トピック「投稿した詳細画面がフッターより下にリピートされる」には新たに返信することはできません。