我有以下代码:
<div id="container" class="activiteiten_singleview">
<div id="content_activiteiten">
<h1 id="pagetitle"><?php echo get_the_title($ID);?></h1>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post();
if ( is_page('48') ) {
query_posts( 'cat=4' );
}
if ( is_page('44') ) {
query_posts( 'cat=6' );
}
if ( is_page('46') ) {
query_posts( 'cat=9' );
}
if ( is_page('50') ) {
query_posts( 'cat=8' );
}
if ( is_page('52') ) {
query_posts( 'cat=7' );
}?>
<div class="postwrapper">
<h3><?php the_title(); ?></h3>
<p><?php the_excerpt(); ?></p>
</div>
<?php endwhile; endif;?>
</div>
</div><!-- #container -->
问题是不仅帖子是在 postwrapper-div 中创建的,而且页面标题也是空摘录。我只想将所有帖子显示为 postwrapper。