Php 如何使用相同的模板在不同的页面上显示不同类别的帖子?
我的类别下有两个类别Php 如何使用相同的模板在不同的页面上显示不同类别的帖子?,php,wordpress,wordpress-theming,Php,Wordpress,Wordpress Theming,我的类别下有两个类别 我的类别 未分类 我创建了一个模板“我的模板”,并使用该模板创建了两个不同的页面,分别称为“第1页”和“第2页” 我想在“第1页”中显示“我的类别”中的帖子,在“第2页”中显示“未分类”中的帖子 我有没有办法做到这一点? 我不想使用插件或已经创建的模板,因为我想这样做是为了学习 query_posts('post_in=39'); while (have_posts()) : the_post(); echo '<div class="box">'; ?>
query_posts('post_in=39');
while (have_posts()) : the_post();
echo '<div class="box">';
?>
<div <?php post_class("posttitle");?>><?php the_title();?></div>
<div <?php post_class("postcontent");?>><?php the_content();?></div>
<?php
echo "</div>";
endwhile;
query_posts('post_in=39');
while(have_posts()):the_post();
回声';
?>