So, it turns out my hunch was correct and the solution is to add some rewrite rules. Here’s what I added:
function owr_blog_rewrite( $rules ) {
return [
'notes/topic/([^/]+)/?$' => 'topic=$matches[1]',
'notes/topic/([^/]+)/page/([0-9]+)/?$' => 'topic=$matches[1]&paged=$matches[2]',
] + $rules;
}
add_filter( 'rewrite_rules_array', 'owr_blog_rewrite' );
Everything works as expected now
Related Posts:
- add_rewrite_rule – working fine but broken for pagination
- How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/
- Varying the number of posts per page from the first one
- How to use pre_get_posts?
- Jetpack Infinite scroll conflicting with theme’s pre_get_posts custom posts_per_page
- Using pre_get_posts to filter out posts, pagination problem
- Skip first post on Category Archive
- 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
- Pagination not working past page 3 on archive page of category
- Prevent WordPress to remove query vars from url
- Custom Query & Rewritten URL Pagination 404
- URL rewrite breaking pagination
- Search pagination rewrite to fix 404
- Why do you need an unlikely integer in paginating?
- How to get the number of Pages in a single Post Pagination?
- Next/Previous Links in same category
- How To create ajaxed wp-pagenavi?
- Disable wordpress pagination URL rewrite for specific page
- Using paginate_links() to generate “1, 2, 3 … 10, 20, 30, 40… 55” paginations
- Combining WordPress pagination functions for archives and search results
- Passing custom args in paginate_links
- Paginate a list of users?
- Allow Users to Choose Pagination or Next/Previous (Combine)
- Pagination that includes “view all on one page”
- Custom page-links for paginated posts | wp_link_pages quicktag
- Jetpack plugin – ‘posts_per_page’ not overriding ‘Blog pages show at most’ option, also different values for different post types?
- Pagination with get_posts seems to work but links not showing
- How to let crawlers search paginated comments?
- In pagination, change link for page 1 to homepage
- Pagination gives 404 in template
- Frontpage pagination issue with paginate_links() function
- pagination with sticky posts
- wordpress pagination, links appear but go nowhere when clicked
- How to make multiple page out of one post
- Pagination not applied on posts
- Remove h2 Tag in screen_reader_text
- 404 not found error on pagination
- Page not found when clicking on pagination tab
- Disable Pagination on Pages
- next_post_link for CPT only working for a few posts? weird!
- How to create Alphabetic pagination with range?
- Site pagination issue
- Archive page pagination links redirecting to home page instead of going next page
- Blog page pagination is not working after using the offset argument
- Make blog page show 10 on first page, 9 on every other page
- WordPress Gallery shortcode with pagination
- How to paginate with letters instead of numbers?
- Pagination in pages (not posts) with the twentythirteen theme?
- How to customize pagination links?
- Post Pagination Showing Same Posts Every Page at wordpress blog
- Cannot go back to the first paginated page using pagination links
- Pagination for search results from a custom query
- Check if “Break comments into pages” is selected
- Custom posts not paginating on archive page and returning 404
- How to use pre_get_posts to alter posts_per_page of category pages, where ‘posts_per_page’ will be dynamic
- Customizing Latest Post Pagination
- Woocommerce products per page dropdown
- WordPress Pagination is not shown
- Show multiple next and previous posts
- How to add pagination to category templates
- Hide content after going to page 2 of archive, show content when back at first page
- Make posts_per_page value the same on all pages
- Page not found yet the posts are listed?
- Search URL redirect problem
- Adding pagination to a custom template that uses custom post types?
- Why are my paginated result links not working?
- Pagination don’t list all entries on Index.php
- WordPress default gallery pagination when in page (is_page)?
- How do I hide a Gutenberg block when paginating
- Understrap Custom Pagination
- Pass global variable from Page 1 to page 2 (Pagination)
- How to remove url from omission dots in WordPress pagination?
- Pagination not working on archive.php
- Pagination 301 redirecting page 1
- change pagination url
- Remove “Page” from Category archive
- Creating a Back button on detail post page to go back to blog page with same query strings and page id
- get_posts custom paging
- page/2 not working in wordpress it showing 404 page erorr
- Extra pagination pages being wrongly generated
- 404 Error on pagination with WP Query
- What is wrong with my code ? pagination does not show up
- Pagination re-direct to main page [duplicate]
- Paginating custom posts in categories yields a 404 error
- Add Custom Pagination Permalink
- Pagination for custom post type not working [duplicate]
- Pagination with wp_pagenavi not working on custom page
- how to apply Pagination on post
- Add Pagination in custom loop
- Custom Post Type Pagination For Genesis Child Theme [closed]
- Modifying previous_posts link to use AJAX
- paginate_links with select option
- Separate page for pagination possible?
- Why does WordPress keep directing or forcing my pagination?