You set offset
param, so paged
param is ignored 😉
From Codex:
offset (int) – number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged
If you want to ignore most recent post in this query, you can achieve it in two ways.
1. Custom pagination.
$ppp = get_option('posts_per_page'); // or any other method to get your posts_per_page
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$args = array(
'offset' => 1 + ( $paged * $ppp ),
'cat' => -22,
'paged'=>$paged
);
2. Ignore first post
$most_recent_post_id = ...; // get the ID of most recent post
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$args = array(
'post__not_in' => array($most_recent_post_id),
'cat' => -22,
'paged'=>$paged
);
Related Posts:
- get_query_var( ‘paged’ ) not working outside of homepage
- Get the number of posts from the current page results
- Why does pagination always break when used on any form of a home page?
- Merged two WP_Queries, posts per page and pagination not working
- “paged” in WP_Query returns 0 posts
- Pagination on template page for custom query redirecting to index.php
- filter posts by meta key with pagination
- Why won’t my paged wp_query work? [duplicate]
- Pagination not working in secondary query
- Multiple WP_Query loops with Pagination
- WordPress Pagination Not Working – Always Showing First Pages Content
- get_query_var function not working at all
- paginate_links() adds empty href to first page and previous link
- Pagination with WP_Query is buggy – working for some pages, but not the others
- WP_Query and Pagination on a Static front page
- Pagination custom query
- Pagination/infinite scroll with WP_Query and multiple loops
- WP_query and pagination?
- pagenavi with merged wp_query [duplicate]
- Add and in the header while looping over custom query in page template
- Pagination not working on static page
- Pagination is not working using WP_Query
- Transient pagination not working properly
- Injecting content with $wp_query->current_post restarts from zero on paged pages. How to inject content after X posts, regardless of pagination?
- Woocommerce custom loop to show all the products [closed]
- How to bring specific post to front of wordpress loop?
- Intentionally exceed max_num_pages on main query without getting 404?
- Pagination 404 errors for author posts query on author.php
- Pagination problem after WP_Query with tag filtering
- Pagination stops at page 6
- Paginated HTML Sitemap
- Posts loop with pagination on a single post page
- Using $paged redirects /page/2 to page 1
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- Pagination is broken and I need help fixing it
- WP Pagination on Posts Search Results Page resulting from AJAX WP Query
- Create A Loop With A Variable Number of Posts For Each Bootstrap Row?
- Five posts from a category in footer
- The pagination on index.php doesn’t work on a first page
- paging in WP_Query on static page
- pagination with numbers for WP_User_Query
- Masonry, WP_Query & paged – first page repeating, second page not loading
- posts_per_page not working for first page of pagination
- Cutom wp_query for geolocation search, pagination not working
- Pagination inside of a edit page
- WP Query to have sticky posts first, with pagination and having a joint ‘posts per page’ arg with main loop
- Pagination on static Posts page
- How do I get my custom query to work with search results after the first page?
- How to cache wp_query with pagination using transients?
- Pagination only won’t work in author template
- Removing duplicate values between two wordpress queries
- wp query error while paging the posts
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Yoast primary category query modification
- Pagination in html table is not working
- Paging + WP Query
- WP_Query custom order and pagination
- Unable to paginate a custom page query
- Query Not working as expected
- WP_query paged pagination with excluded category still counts it
- max_num_pages says 4, yet I am only able to navigate to the third page
- Paginate pages with dynamic query
- Determining what post is displayed out of total posts found
- Trouble Making WP_Query paged
- Ajax (jquery) wp_query pagination returns -1
- Having a variable based on $post_count increase when i move to the next page of results
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- pre_get_posts pagination not working
- Pagination not working on archive.php template?
- WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination
- Pagination unique to a widget
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- Pagination inside the blog page not working
- Why pagination is not working with tax_query param?
- paginate_links method doesn’t show second page of my custom wp_query
- Wp_Query Post per page not working?
- Pagination Shows Up But Won’t Work on Custom Gallery Page
- Custom Query Pagination not working on static front page
- WordPress search page pagination displaying but not functional
- Paginated Post List on Front Page
- Combine WP_Query with array of custom data to single loop without breaking the pagination
- Pagination returns 404 after page 20
- WP_Query with Pagination and orderby meta_value_num showing duplicates
- Archive – Show Page Month Headers
- Pagination for custom query throws 404 errors on last pages [duplicate]
- Horizontally paginate through sets of blog posts?
- Pagination error WordPress multiple loop
- Next / previous posts link doesn’t show up with Posts 2 Posts
- Comments orderby comment date not working
- Switched from query_posts to wp_query, pagination no longer working
- Pagination With Custom WP Query not functioning
- Ordering Custom WP_Query loop by meta key value with pagination
- Query specific number of posts for each post type in specific order
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- Pagination in custom query not working [duplicate]
- paginate_links() on page (shortcode output)
- WordPress Post Looping? [duplicate]
- error with $query->have_posts()
- Pagination on custom post type not working
- Pagenavi with archive page