One of two things is happening that I can think of:
-
You have sticky posts showing up. Try adding an
ignore_stickie_posts
argument.$args = array ( 'pagination' => true, 'posts_per_page' => 5, 'ignore_stickie_posts' => true, );
-
You have a poorly written (too global)
pre_get_posts
filter.
Something like:function naughty_pre_get_posts( $query ) { $query->set( 'posts_per_page', 1 ); } add_action( 'pre_get_posts', 'naughty_pre_get_posts' );
Also, when you name your query $wp_query
you clobber the main query on the page and that can cause unexpected/unpredictable effects. Choose a new name for the custom query, or if you are attempting to alter the main query proper, convert the whole thing into a pre_get_posts
filter.