Monthly Archives: March 2012

Custom Template Pagination Fix When Set As Front Page

Had a custom template that I set as the Front Page for a site but couldn’t get pagination working correctly. Fortunately found a fix thanks to Devin Price (@devinsays) over on a blog at http://mondaybynoon.com/20110516/wordpress-posts-per-page-per-custom-post-type/#comment-42451

Going to repost the code here but all credit goes to Devin Price of http://www.wptheming.com/

if ( get_query_var( 'paged' ) )
     $paged = get_query_var( 'paged' );
     elseif ( get_query_var( 'page' ) )
     $paged = get_query_var( 'page' );
     else
     $paged = 1;