Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created March 11, 2014 20:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/9494254 to your computer and use it in GitHub Desktop.
Save billerickson/9494254 to your computer and use it in GitHub Desktop.
if ( $query->is_home() && $query->is_main_query() ) {
$posts_per_page = 8;
$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 0;
$query->set( 'offset', 5 + $posts_per_page * $page );
$query->set( 'posts_per_page', $posts_per_page );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment