Pagination with offset not working
-
Hi,
I have a custom query and pagination works fine:
global $paged; if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); } elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); } else { $paged = 1; } $query_args = array( 'posts_per_page' => '5', 'paged' => $paged ); $my_query = new WP_Query( $query_args );
But when adding offset to the args, the same posts are being displayed when going to the next page(s):
'offset' => '1',
I’m certain the pagination is set up properly, it takes regular page and front page into account.. Am I missing something?
Guido
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Pagination with offset not working’ is closed to new replies.