Regarding the number of pages displayed, read through the arguments for paginate_links
, specifically end_size
and mid_size
.
As for the 404- The problem is there is no page 3. Whether or not a page returns content or loads the 404 template is based on the results of the main query, not your custom query you run in the template. If this is a page
post type, try setting the paged
query var instead of page
.
Related Posts:
- How do you paginate a query grouped by month?
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Custom post type archive 404’s with paginate_links
- Number of pages – multiple (custom) post types
- Custom permalink with pagination
- Related posts by author pagination not working on the production site
- Secondary loop pagination on custom post type single post gets redirected to first page
- Pagination Doesn’t Work
- Numeric pagination custom post type
- Custom wp_query pagination – next_posts_link() or wp_pagenavi() always empty
- custom post type paging not working past page 3
- WP_Query pagination using only numbers instead of /page/1 on URL
- Pagination not working
- Pagination Issue: Custom Post Type In Index
- Custom query form submission pagination
- Paginated Taxonomy Term Archive including one post per term
- Custom post type archive page pagination
- Pagination on category page with custom post types
- How to add pagination to wp_query [duplicate]
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Pagination on a custom post type loop
- Previous/Next Link by Meta Value in CPT
- Pagination for Custom Taxonomy Page [duplicate]
- Pagination on with query_posts in custom post type template
- Custom taxonomy rewrite give pagination 404
- Woocommerce search pagination not working
- Pagination issue on category.php using custom post type query
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- can these 3 queries be re-written as 1 query?
- pagination not working for category.php (custom post types in categories)
- Custom WP_Query always respond with 200 status even when no entry
- Trouble with pagination
- Pagination 404 on Index with custom query
- How to properly rewrite pagination rules for a CPT to avoid 404 error on /page/2
- Custom post type and custom taxonomy 404 on page 2
- Using Pagination for Custom Post Type and keeps returning 404
- Pagination for search results of custom post type [duplicate]
- Custom Post Type Archive Pagination
- All blog posts are not showing up
- Single parent post lists child posts with pagination
- Custom post type pagination error
- Previous / Next Links For Custom Post Type Sorted By Meta_Value
- custom taxonomy pagination 404 error
- Pagination in custom post type archive.php not working
- Pagination Not Working When Used With WP_Query() `offset` Property
- Numeric pagination custom post type
- Problems in paginate_links with custom query loop and MB-Relationships
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- Make pagination work as a carousel (custom query)
- I want to create pagination for my custom post type archive that i am displaying with loop
- Post navigation doesn’t show (in custom template, custom post type, custom query)
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- why custom post archive gives always no more than 10 posts despite of paging settings?
- Paginating custom query on category template
- query and paginate multiple post types
- Custom pagination [duplicate]
- Custom post type blog pagination conflict
- Custom post type pagination, single page issue
- Pagination always adding “Next” link when results come from Custom Post Type WP_query
- Paged within a custom content type template [duplicate]
- Pagination not working on homepage
- send user to first page of results when reposting to page?
- Fourth page of custom post type archive page does not exist
- Pagination broke after updateto WordPress 3.4 [duplicate]
- Pagination not working for archive
- Archive page – problem with pagination
- Two pagination in one page without AJAX
- Query Multiple Post Types and Paginate Newly Created List
- “Page not found” while on page 2 from pagination menu
- Create an archive page by combining two post type
- Pagination links for custom post type shows correct number of links, but links result in Page not found
- Custom Form / Search with Custom Post Type Data
- Pagination for custom post type giving 404 error (but only for news page)
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- set object terms after some some time of published post – functions.php
- Get next and prev item from custom WP_Query and Custom Post Type
- Change search query in wordpress custom post type
- how to skip a CPT element from the pager by custom field
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Create if else for post types in WP_Query ‘post__in’ values
- WP Query from two Custom Post type fields as statement
- Alike Shortcode using in Custom Shortcode
- Sort custom posts by date and then by taxonomy
- WP Query: If field X is empty, show posts based on field Y
- Query custom post type that has a serialized relational advanced custom field value
- Exclude a specific post in a Custom Post Type
- have to do a while have post to show for two custom post types sharing the same taxonomy?
- Display Parent-Child Posts in specific order by comparing IDs in array
- Random item on Custom Query working Local but not on live
- Display related CPT with custom taxonomy
- Custom post type paging return home page
- Query to show post current day
- Using ACF values in nested WP queries for CPT with date values in the past
- Pin posts to top of custom loop
- Apply category query clause to posts of custom type
- custom post type and a “sticky” position taxonomy
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Display post count for a specific month
- WP_Query: how to search tags in addition to a custom post type?
- display post count in archive page that have relation with another taxonomy term