カテゴリーページでのページング
-
各カテゴリーのページで下記URLと同じページング機能を付けたいのですが、
どうもうまくいかないので、ご相談させていただきました。URL:http://test.ne-co.info/nakagawa/test/omoi
現状はページングの番号までは出るようになりましたが、
数字をクリックすると「お探しのページが見当たりません」という結果になります。URL:http://test.ne-co.info/nakagawa/test/category/entyou/
タグに関してはhttp://test.ne-co.info/nakagawa/test/omoiと同じタグを利用しています。
<?php if (have_posts()) : query_posts('cat=3,4&posts_per_page=2&paged='.$paged); ?> <?php while (have_posts()) : the_post(); ?> <div class="omoi_tit"> <span class="cate_tit"><?php $category = get_the_category(); echo $category[0]->cat_name; ?></span> <h3><?php the_title(); ?></h3> <span class="omoi_date"><?php the_time('Y年n月j日'); ?></span> </div> <div class="omoi_naka"> <?php the_content(); ?> </div> <img src="<?php bloginfo('template_url'); ?>/img/omoi_naka_bottom.gif" alt="" width="712" height="6" style="margin-bottom:30px;" /> <?php endwhile; ?> </div> </div> <div class="tablenav"><?php global $wp_rewrite; $paginate_base = get_pagenum_link(1); if (strpos($paginate_base, '?') || ! $wp_rewrite->using_permalinks()) { $paginate_format = ''; $paginate_base = add_query_arg('paged', '%#%'); } else { $paginate_format = (substr($paginate_base, -1 ,1) == '/' ? '' : '/') . user_trailingslashit('page/%#%/', 'paged');; $paginate_base .= '%_%'; } echo paginate_links( array( 'base' => $paginate_base, 'format' => $paginate_format, 'total' => $wp_query->max_num_pages, 'mid_size' => 5, 'current' => ($paged ? $paged : 1), )); ?></div> <?php wp_reset_query();endif; ?> </div>ひょっとしたらすごく簡単なことで詰まっている気はするのですが、
ご指導をいただければ幸いです。よろしくお願いいたいます。
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
トピック「カテゴリーページでのページング」には新たに返信することはできません。