-
-
Save anonymous/9e7716a006667a667432 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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