How to Display Recent Posts From A Specific Category In WordPress




<?php
 $catquery = new WP_Query( 'cat=3&posts_per_page=10' );
 while($catquery->have_posts()) : $catquery->the_post();
?>
<ul>
 <li>
  <h3>
   <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
  </h3> 
  <ul>
   <li><?php the_content(); ?></li>
  </ul>
 </li>
</ul>
<?php endwhile; ?>





Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.