Skip to content

Instantly share code, notes, and snippets.

/functions.php Secret

Created Nov 24, 2013
Embed
What would you like to do?
<?php
function itsme_editions_ppp( $query ) {
if( $query->is_category() && $query->is_main_query() ) {
if( !$query->is_paged() ) {
$query->set( 'posts_per_page', 10 );
} else {
$query->set( 'offset', 10 );
$query->set( 'posts_per_page', 15 );
}
}
}
add_action( 'pre_get_posts', 'itsme_editions_ppp' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.