Created
May 30, 2013 15:31
-
-
Save anonymous/5678783 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
/** Pagination on home page */ | |
add_action( 'pre_get_posts', 'child_change_home_query' ); | |
/** Changes the query on the home page*/ | |
function child_change_home_query( $query ) { | |
if( $query->is_main_query() && $query->is_home() ) { | |
$query->set( 'posts_per_page', '10' );//change to the posts setting for your widget | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment