トップページに投稿ページと固定ページを表示したい
-
front-page.phpに
———————————————————–
「ヘッダー」
↓
「投稿ページ(カテゴリー1)」
↓
「固定ページ」
↓
「投稿ページ(カテゴリー2)」
↓
「フッター」———————————————————–
の順でページを表示させたいのですが、
固定ページの箇所で「投稿ページ(カテゴリー1)」の投稿内容が表示されてしまいます。
正しく固定ページを表示させたいのですが、試行錯誤しても解決ができません。以下がfront-page.phpのソースとなります。
<?php get_header(); $header_image = get_header_image(); if ($header_image):?> <p id="mainImg"><img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php bloginfo( 'description' ); ?>" /> <?php endif;?> <div id="content"> <section> <?php query_posts($query_string . "showposts=6&cat==" .(get_category_by_slug('usecase')->term_id)); ?> <?php if (have_posts()) :?> <h2 class="title"><span>NEW!最新ご利用事例</span></h2> <div class="thumbWrap"> <ul class="thumb"> <?php while (have_posts()) : the_post(); ?> <li> <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> <span class="date"><?php the_date("Y/m/d"); ?></span> <?php the_post_thumbnail(array(160,160)); ?> <?php the_excerpt();?> <?php endwhile; ?> </ul> </div> <?php else: ?> <?php endif; ?> <?php if ( have_posts()) : the_post(); ?> <article id="post-<?php the_ID(); ?>" class="content"> <header> <h2 class="title"><span><?php the_title(); ?></span></h2> </header> <?php the_content();?> </article> <?php endif; ?> <?php query_posts($query_string . "showposts=6&cat==" .(get_category_by_slug('uservoice')->term_id)); ?> <?php if (have_posts()) :?> <h2 class="title"><span>お客様の声</span></h2> <div class="thumbWrap"> <ul class="thumb"> <?php while (have_posts()) : the_post(); ?> <li> <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> <span class="date"><?php the_date("Y/m/d"); ?></span> <?php the_post_thumbnail(array(160,160)); ?> <?php the_excerpt();?> <?php endwhile; ?> </ul> </div> <?php else: ?> <?php endif; ?> </section> <?php get_footer(); ?>
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「トップページに投稿ページと固定ページを表示したい」には新たに返信することはできません。