3 replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
source | link

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: http://wordpress.stackexchange.com/a/85658/21376https://wordpress.stackexchange.com/a/85658/21376

  2. 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.

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: http://wordpress.stackexchange.com/a/85658/21376

  2. 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.

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: https://wordpress.stackexchange.com/a/85658/21376

  2. 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.

2 edited body
source | link

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: http://wordpress.stackexchange.com/a/85658/21376

  2. You have a poorly written (too global) pre_get_posts_filterpre_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.

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: http://wordpress.stackexchange.com/a/85658/21376

  2. 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.

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: http://wordpress.stackexchange.com/a/85658/21376

  2. 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.

1
source | link

One of two things is happening that I can think of:

  1. 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,
    );
    

    See: http://wordpress.stackexchange.com/a/85658/21376

  2. 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.