Bootstrap Templates Bundle

Tuesday, December 25, 2012

PHP code for post list by category


<?php query_posts('cat=15&showposts=5'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
  </li>
<?php endwhile; endif; ?>


add this code where you want to add post list by category

1 comment:

Wokiee React eCommerce Template