ワードプレスのカスタム投稿の個別記事ページに、記事タイトルを表示できなくて困っています。
通常の投稿ページでは表示されています。
該当のカスタム投稿記事ページは、single.phpをコピーした内容に
サイドバーを追加したものです。
タイトルだけがうまく表示されません。
カスタム投稿だからなのか、何か他の設定が関与しているのか
全く想像がつきません。
<?php get_header(); ?> <section> <div id="content"> <div id="tea-m"> <?php get_sidebar(4); ?> <div id="tea"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <article id="post-<?php the_ID(); ?>" class="content"> <h2 class="title"><span><?php the_title(); ?></span></h2> <div class="post"> <p class="dateLabel"><time datetime="<?php the_time('Y-m-d')?>"><?php the_time('Y/m/d')?></time> <?php the_content(); ?> </div> </article> <?php endwhile;?> <?php endif; ?> </section> </div></div></div> <?php get_footer(); ?>
ご指導よろしくお願いします。
サイドバーのコードを追記します。
<aside id="sidebar"> <ul> <?php wp_list_categories(array('title_li' => '', 'taxonomy' => 'w_cat', 'show_count' => 1, 'depth' =>2, 'orderby=slug')); ?> </ul> <?php theme531_rwd_sidebarBanner(); ?> <?php $posts = get_posts('category_name=info&numberposts=5');?> <?php if ($posts):?> <?php endif;?> <?php dynamic_sidebar('sidebar'); ?> <?php theme531_rwd_sidebarBanner2(); ?> </aside>
回答2件
あなたの回答
tips
プレビュー