我建议您使用两个for循环,使用两种post类型。For blog post use below code
<?php query_posts( array(
\'post_type\' => array( \'post\')
\'showposts\' => 5 )
); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="post_type">
<a href="<?php the_permalink(); ?> "><?php the_title(); ?></a>
<div class="excerpt">
<?php echo get_the_excerpt(); ?>
</div>
<?php endwhile; ?>
For page post use below code
<?php query_posts( array(
\'post_type\' => array( \'page\')
\'showposts\' => 5 )
); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="post_type">
<a href="<?php the_permalink(); ?> "><?php the_title(); ?></a>
<div class="excerpt">
<?php echo get_the_excerpt(); ?>
</div>
<?php endwhile; ?>