Last active
December 21, 2015 03:09
-
-
Save braddalton/6240396 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
add_action( 'pre_get_posts', 'change_posts_number_home_page' ); | |
function change_posts_number_home_page( $query ) { | |
if ( is_home() ) | |
$query->set( 'posts_per_page', 5 ); | |
return $query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment