在页面中嵌入页面

Avatar of Chris Coyier
Chris Coyier
<?php $recent = new WP_Query("page_id=**ID**"); while($recent->have_posts()) : $recent->the_post();?>
       <h3><?php the_title(); ?></h3>
       <?php the_content(); ?>
<?php endwhile; ?>

上面的代码可以在常规页面循环中使用。将 **ID** 替换为要嵌入页面的 ID。