Thanks to this and this i was able to adapt the solution to my problem.
Solution:
add_action( 'init', 'wpa58471_category_base' );
function wpa58471_category_base() {
add_rewrite_rule(
'blog/([^/]+)/page/(\d+)/?$',
'index.php?category_name=$matches[1]&paged=$matches[2]',
'top'
);
add_rewrite_rule(
'blog/([^/]+)/(feed|rdf|rss|rss2|atom)/?$',
'index.php?category_name=$matches[1]&feed=$matches[2]',
'top'
);
}
Related Posts:
- Clean install – Changing permalinks in twentyeleven give 404
- Home page Pagination – Other pages do not redirect to home page template
- WordPress /page/2 gives 404 when custom permalinks is set to %category%%postname%
- After server migration only the homepage works
- Changing permalinks gives me 404 errors on nginx
- Why is “/page/2/” not working?
- Get current URL (permalink) without /page/{pagenum}/
- Including category-base in a post permalink results in 404
- WordPress thinks my custom route is a 404
- Adding anchor to paginate_links + Safari anchor bug
- Homepage loads but all permalinks are 404 when using nginx & PHP-FPM
- removed index.php now all pages 404
- Archive pagination causing 404 with permalinks structure
- Permalinks Structure and 404 Question
- Add ‘articles’ prefix before blog posts url without affecting pagination
- Attachment page 404 not found when image is attached to post
- After moving from subdirectory to home, home page does not display
- Changes to permalink structure results in 404 error for all pages other than home
- permalink changed, now getting 404 for every pages
- Permalinks broken regularly
- Permalinks keep reverting to 404 unless I re-save them
- Permalink change made author archive vanished
- Permalinks okay some pages but 404 error on others
- Custom permalink for search and pagination
- wp_logout_url redirects to incorrect page because of pagination
- AWS WordPress Install – pages/posts 404 on restart until updating permalinks
- Permalinks by page/post name returning 404
- How to Get Page 2 / Paginated RSS Feed with Custom Permalink Structure?
- Custom Permalink
- Pagination Issue – /page/2 404
- Editing Pages Give 404 Error After WordPress Upgrade in Admin Panel
- page nested 3 levels deep shows 404
- Changing the post date without causing 404 error
- Nginx Rewrite Rule:: index.html added to every permalink
- How to make /search/ without parameters not return a 404?
- 404 Error Problems with sCategory Permalink plugin
- Why does the ‘Month and Name’ Permalink Format not Work on my new WordPress Site (running on IIS7)?
- Help with Elementor Pagination CPT archive 404 problem
- Why is page/2/ not working?
- WordPress post-name permalink redirects to site.com
- Unable to get /%postname%/ permalinks working, 404 on all links
- Permalinks stopped working – NO update, mod_rewrite enabled, .htaccess not touched
- WordPress can generate numeric permalinks, which then 404
- Custom permalink structure gives 404
- Accessing Subdirectories in WordPress Install
- Post preview gives 404 when permalinks are purely date based
- WordPress suddenly changed all links to example.com/example.com/
- Resolve 404 on posts without category
- How to handle paging/pagination with a custom permalink?
- Visiting posts results in 404 errors after host migration
- Change permalink structure for pagination only
- How do I change the permalink structure without getting 404s?
- 404 on internal pages, in all sites in my local server
- Pagination using paginate_links
- WordPress pages and posts are redirecting to server IP address instead of domain URL [closed]
- Page redirect to 404 when set Permalink = “Post Name”
- Fix 404 error after changing permalink structure
- WordPress Permalinks 404 bug with “next” button
- how to set up wp in folder within static website?
- permalink and add_rewrite_rule – error 404
- Pagination breaks on child-categories, works fine on parent-category
- The requested URL was not found on this server [closed]
- WP-e-commerce (getshopped) – Annoying permalink issue [closed]
- Browsing to permalink prefix results in 404
- Problem with special character WordPress
- Whole site’s pagination not working after rewriting product permalink
- Xampp 7.3.3 fresh install of WordPress 404 pages unless permalink is set to plain
- Custom structure permalink preventing 404
- Extending page urls without getting a 404
- I have a 404 error on all my pages! What do I do?
- Giving specific category posts its own permalink structure returns 404
- 404 on pretty permalinks when serving via HTTPS
- 404 error on published page with specific permalink
- Custom permalink gives 404 error only in some pages
- Woocommerce product page 404 not found
- Every sub page shows Error 404, i have check permalink but still same issues
- Remove Permalink of certain posts
- Added .html to Woocommerce permalink but pagination don’t work!
- Pagination links for taxonomy archive page 404 error on every page except first
- wp_dropdown_categories links 404
- HTTPS permalinks resulting in 404
- Permalink Rewrite with Archive – Archive gets 404
- Change the permalinks structure
- When using number in url it is redircting to same page but when using character it redirects to 404
- WordPress Pagination Not Working After Transfer from Localhost
- Page_link change
- Add Custom Pagination Permalink
- Accidentally changed the permalink structure
- Search page Paginations not working
- Although rewrite engine is on, I get 404 not found on every page
- Only homepage working correctly, 404 error on everything else
- Pagination is not working, how to trace it properly?
- homepage olderposts link showing page not found
- 404 error on second page load for child-pages
- Category pagination first link works, remaining don’t
- Post archive pages bringing me to a 404 page
- Parent pages not found with pretty permalinks
- WordPress keep redirecting me to random URLs
- Plugins, themes and other dashboard links including permalinks giving 404 error
- WordPress Permalinks 404 Not Found