I didn’t really solve it, but got around with the help of Passing custom args in paginate_links and Custom paging function.
Initially I even thought of writing a patch to next_posts_link
, but as it turns out, the URL formatting problem lies way below in the function soup, and that is really a downer when all I wanted was to reuse some earlier code that went into this template when it was still static.
My solution for now was to leave it all behind and start fresh with paginate_links()
. Turns out that paginate_links doesn’t care about permalink structure and always appends ?page=4
to the URL which just makes a lot more sense. 🙂
UPDATE:
Followinfg along, I got this problem -> paginate_links() adds empty href to first page and previous link which was properly solved after all. 🙂
Related Posts:
- 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
- Pagination not working
- Pagination Issue: Custom Post Type In Index
- Custom query form submission pagination
- Paginated Taxonomy Term Archive including one post per term
- Unable to get paginate_links working with a custom query [duplicate]
- 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
- How do you paginate a query grouped by month?
- 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
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Trouble with pagination
- Pagination 404 on Index with custom query
- Custom post type and custom taxonomy 404 on page 2
- 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)
- 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?
- query and paginate multiple post types
- 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]
- Archive page – problem with pagination
- Mixing regular and custom post types (with meta_query) on home page
- $wp_query->queried_object->ID throws warning: Undefined property
- Archive page…limiting posts per page
- Display Custom Post Type Fields
- Use WP_Query object inside a function
- WP_Query search custom posts meta date fields
- Get posts with tag all post types
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- Creating a simple pagination for custom post type templates
- Query for custom posts with a specific tag slug
- WP-Admin edit.php & post.php slowdown after import of 10k users
- WordPress Orderby Numeric Value Not Working
- Show one item per category of a custom post type
- Storing posts from query and accessing later via AJAX call
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- List all posts in a custom post type with pagination (the correct way)
- First custom field value (out of several) displayed twice after query
- WP_query – Filter by tax_query and meta_query using multiple select
- Create a list of recent Custom Post Types posts
- Empty search input does not return all posts
- next page with custom post
- Pagenavi Plugin and Custom Post Type – Multipage results
- Foreach result into WP_query
- Query posts based on user preferences
- Post navigation doesn’t show (in custom template, custom post type, custom query)
- Custom Pagination based on Custom Post Type
- How can I use WP_Query argument ‘Like %..%’?
- WordPress custom post type
- Custom post type single display is ommited
- Pagination with Custom Post Type
- Query child posts on parents single.php?
- paging is not working properly on news archives page [duplicate]
- Custom Post Query Combined with Conditional Tags
- Custom loop won’t work, can’t find problem
- Query by post type or category
- Get all custom_post_type posts + blog posts from one category in a single query
- Customising wordpress search and using $_GET[“s”]
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Problems with pagination for a custom post type
- See the process of creating a taxonomy and tell me where I made a mistake
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- How do I get parameters from the URL?