WordPress tutorials: Posts this month

Wpsnipp – You can change the range to weekly, monthly, alltime. You can also add excerpts to each post, display a thumbnail next to them, and you can even display post ratings.Adding this code to your template just before the loop will display posts from only the current month.

 

 

 

<?php
$month = date('m');
query_posts(
array(
'posts_per_page' => 11,
'monthnum' => $month
));
?>

Be Sociable, Share!

Leave a comment