Wordpress: Query page excerpt

/ Published in: Other
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <?php query_posts('post_type=page&posts_per_page=1&page_id=2'); ?>
  2. <?php while (have_posts()) : the_post(); ?>
  3. <h3><?php the_title(); ?></h3>
  4. <p><?php the_excerpt(); ?></p>
  5. <?php endwhile;
  6. //Reset Query
  7. wp_reset_query(); ?>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.