Advertisement
Guest User

Wordpress Show Post of Certain Category

a guest
Jul 18th, 2012
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  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; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement