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

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I believe Web time sheet software makes the complete employee time clock tracking task easier. Its easy to update, approve and maintain the time sheets in no time.Time Attendance System

    ReplyDelete

Wokiee React eCommerce Template