Guest User

Wordpress Show Post of Certain Category

a guest
Jul 18th, 2012
238
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php query_posts('cat=1&showposts=5'); ?>
  2. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  3.   <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
  4.     <?php the_excerpt() ?>
  5.   </li>
  6. <?php endwhile; endif; ?>
RAW Paste Data