Change wordpress blog limit to months rather than by number of posts

0 votes
asked May 12, 2013 by onebitrocket

Is there a way to override how wordpress displays a number of posts on a listing of posts page, regardless of page type (archive, category, posts, tags etc.)?

I'm transferring content from a static site where the pages are saved using a month format.

I'd like to be able to set wordpress' previous/next link navigation to work using months, rather than the limit of posts per page.

So if the navigation would go forward/backward to the previous/next month where there is published content.


1 Answer

0 votes
answered Nov 8 by itsdaniel0

Perhaps a WordPress Query will work? Such as... (Not tested)

$month = date('m');
$query = new WP_Query( 'monthnum=' . $month );

As the WordPress Codex lists

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.