如果我理解正确,您需要在页面模板上显示特定的类别索引,对吗?
如果是这样的话你可以用WP_Query:
<?php /* Template Name: My Page Template */ ?>
<?php get_header(); ?>
<!-- If you want to retrieve the page title, content, ... -->
<?php the_post(); // set up the post ?>
<h1> <?php the_title(); ?> </h1>
<div class="content"> <?php the_content(); ?> </div>
<!-- Then your category index -->
<?php
$category_id = get_cat_ID(\'YOUR CATEGORY NAME\');
$args = array(
\'cat\' => $category_id,
\'paged\' => get_query_var(\'paged\') ? get_query_var(\'paged\') : 1
);
$cat_posts = new WP_query( $args );
if($cat_posts->have_posts()):
while($cat_posts->have_posts()):
$cat_posts->the_post();
?>
<div class="cat_post">
<h1> <?php the_title(); ?> </h1>
<div class="content"> <?php the_content(); ?> </div>
</div>
<?php endwhile; ?>
<div class="pagination">
<?php next_posts_link( __(\'Older Entries\'), $cat_posts->max_num_pages ); ?>
<?php previous_posts_link( __(\'Next Entries\') ); ?>
</div>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<?php get_footer(); ?>
记住要改变
YOUR CATEGORY NAME
照着