- May 16, 2013
- Posted by: Admin
- Category: Wordpress
How to display latest post from specific category in wordpress
Hi friends, this is very important for all magazine or news website company who are mostly want to display latest post from specific category in wordpress for particular area of category.
Below is the code which you can put in template file. But make sure you will change the category id and number of posts to display.
while(have_posts()) : the_post();
<span class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></span>
<p class="post-content"><?php the_content(); ?></p>