• I have a unique situation where the query I’m using has to be a custom select query. Because of this the global $wp_query paginates. This makes some plugins and other functions add additional coding that is unnecessary.

    I’ve tried several functions to fix this. Including this:

    add_action( 'pre_get_posts',  'change_posts_number'  );
    function change_posts_number( $query ) {
            $query->set( 'posts_per_page', -1 );
        return $query;
    }

    Also I’m using Genesis.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set Custom Query Pagination’ is closed to new replies.