You have to add another rule which maps the /page/# to the &paged=# variable.
Really though, you’re kinda doing it all backwards here by filtering the rules array. Just calling add_rewrite_rule to add your rules makes a bit more sense.
function plugin_name_add_rewrite_rules() {
add_rewrite_rule('players/type/([^/]+)/?$',
'index.php?post_type=players&type=$matches[1]',
'top');
add_rewrite_rule('players/type/([^/]+)/page/([0-9]+)?$',
'index.php?post_type=players&type=$matches[1]&paged=$matches[2]',
'top');
}
add_filter('init', 'plugin_name_add_rewrite_rules');
Related Posts:
- add_rewrite_rule – working fine but broken for pagination
- Why am I getting a 404 on anything past page 1 of my query?
- remove_query_arg() on rewrite rule
- Pagination: /tags/tag_name/?paged=2 gives a 404 error
- How to stop WordPress returning 404 on paginated pages after using add_rewrite_rule()?
- rewrite url with parameter or pagination beyond certain value does not work
- stop pretty pagination rewrite site.com/cat/2 => site.com/cat?page=2
- 404 when using pagination in a category
- Problem with Paging 404
- Prevent WordPress to remove query vars from url
- Custom Query & Rewritten URL Pagination 404
- URL rewrite breaking pagination
- Search pagination rewrite to fix 404
- How to display pagination links for WP_User_Query?
- post pagination names, not numbers
- Display “Page 3 of 5” for a paginated post
- Single Page View for Paginated Posts
- Change class=”page-numbers” in pagination
- How to get post pagination like this
- Pagination Not Displaying on Custom Term Archive
- Non existing blog pages are not redirected to 404
- Limit number of pages in pagination
- wp_link_page – wrap current page element
- How to create pagination on archive.php template
- Paginate get related post by author function
- Keep Pagination in Tabs
- Jetpack Infinite scroll conflicting with theme’s pre_get_posts custom posts_per_page
- WordPress rewrite my URL when i use pagination
- Having issues with wordpress pagination with multiple categories
- Paginate Child Pages Content on Parent Page
- Pagination is somewhat working on frontpage, doesn’t update when “prev” is clicked
- Blocking author paging for blog entries?
- Get total posts found, but while using limit for pagination? get_posts
- Show post count in wordpress instead of page count in wordpress pagination
- remove paginations functions only on home
- WordPress Pagination with Get Value
- Show number of posts and number on current page (revisited)
- Rewriting get_next_posts_link() for custom loop
- Limited number of paging to 10 “pages: 1 … 10”
- Hide featured post on second page
- Customize WordPress Core Template
- How to add a zero before numbers in WordPress Post Pagination?
- next_posts_link does not work when querying a specific category
- Tabbed content with Pagination
- Next and Previous buttons for navigation
- Offset a post in the loop, with using PageNavi Plug-in
- Last page in pagination does not match max_num_pages – the overall post count is less according to pagination
- Frontend sorting
- Limiting number of visible links displayed with wp_link_pages
- Pagination not working in custom page, only working in post page
- Only show Previous & Next button in Pagination
- Adding a rewrite rule to page that has no fixed variables and pagination
- Pagination isn’t created when there is only one page of posts
- Different layout on second page
- Pagination Not Working When Modifying Loop Based on Post Category
- custom posts archive pagination links /page/2/ ends up in 404
- WP Query for all posts
- where is wordpress search pagination
- Pagination for Custom WP_Query not displaying page 2 results
- pagination error in taxonomy: Warning: Division by zero
- Pagination for custom post types – url rewriting
- Pagination Links Not Showing Up on single.php posts on iOS Devices
- next_posts_link(); & previous_posts_link(); not working properly
- Ending Pagination loop in PHP
- Paginate the_content automatically? [duplicate]
- pagination links not displaying
- remove rel=next on category page (if
- Page navi for template page
- WordPress paginate_links function: How do i ensure the page number is not less than 1 and not greater than last
- Pagination on page 2+ only
- How to replace pagination with Next/Previous for multi page posts?
- How to Add Pagination to Page?
- Disable and redirect pagination of Home
- Can’t Add Pagination
- How to hide empty pagination button when no previous page
- Pagination not working on homepage, On other pages it is working
- Tags pages for different Custom Post Types and WooCommerce Products sharing Post Tags
- next and previous category name and link parent only wordpress in archive page
- WP_User_Query counter not updating with pagination
- Remove Number Of Pagination [closed]
- I would like help getting my pagination to work
- Display Both next previous and number in single page [duplicate]
- How to add pagination to custom page
- Need help on wordpress pagination script
- Update Gallery Randomly in every hour with no duplicates?
- Custom page pagination based on Kriesi pagination
- Test for if you’re on 1st page of paginated post (with nextpage quicktag)
- Pagination issue [duplicate]
- Pagination link problem when reaching the second page
- Add next and previous post links on pages like category, tags or archive pages
- Stop loading more posts if none left AJAX
- Reverse ordered pagination on home page
- Intercepting $_GET variable from custom pagination
- Default pagination in Home/Front page
- Making a Killer wp_link_pages
- pagination leads to 404 page
- Show pagination in WP_Query
- How to automatically load more data when users reaches at the bottom of the page of the wordpress site?
- How to make infinite scroll by dividing the content?
- Change Pagination Default to “/2/” Query String “?page=2”