Open
Description
- I've read and understood the contribution guidelines.
- I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened
I noticed this issue with a multisite but this should affects any site which uses a permalink structure with a custom front like /blog/posts/%postname%/
.
In my case the $blog_prefix
was set to blog/
which means any access to /blog/posts/<category-name>/
lead to a 404 page.
Related code:
wordpress-seo/inc/class-rewrite.php
Lines 138 to 145 in 2a6b6cb
Note that the /blog
prefix is no longer required as of https://core.trac.wordpress.org/changeset/34749.
To Reproduce
Step-by-step reproduction instructions
- Create a multisite which is not a subdomain install
- Use
/blog/posts/%postname%/
as the permalink structure for the main site - Create a post with a category
- Try to access the category archive
Expected results
/blog/posts/<category-name>/
returns the category archive
Actual results
/blog/posts/<category-name>/
returns a 404 page
Screenshots, screen recording, code snippet
If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.
Technical info
- If relevant, which editor is affected (or editors):
- Block Editor
- Gutenberg Editor
- Elementor Editor
- Classic Editor
- Other:
- Which browser is affected (or browsers):
- Chrome
- Firefox
- Safari
- Other:
Used versions
- Device you are using:
- Operating system:
- PHP version:
- WordPress version:
- WordPress Theme:
- Yoast SEO version:
- Gutenberg plugin version:
- Elementor plugin version:
- Classic Editor plugin version:
- Relevant plugins in case of a bug: