• On WordPress -> Permalink Settings, I am having some issues trying to set Custom Structure to set slug for posts to match blog structure.

    For example, when I set Custom Structure to blog/%postname%/this results in the posts not being found. The original link domain.com/%postname%/ obviously no longer works and displays 404 page not found, but the problem is the same for the new location domain.com/blog/%postname%/

    However, I have found that if I set Custom Structure for posts to another slug that does not match blog path like /articles/%postname%/ then it works fine. For instance -> domain.com/articles/%postname%/

    So as a result, I then altered the blog page to suit the new articles slug and again, a page not found on the post page. If you view the main blog, the posts are listed as normal, but when you click to view the individual post, it’s page not found on either URL (old or new).

    Is this achievable and if so, how?

    Ultimately, all I want is posts to be viewable under the custom structure that matches the blog slug path. Such as /blog/%postname%/ or /articles/%postname%/

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • I just installed a test site to try to understand your issue.

    But either I don’t understand the issue you’re describing, or I’m unable to replicate it (meaning it’s something specific to your WordPress site).

    WP Instance: 6.0.1 with the default theme and no plugin installed

    Custom Permalink Structure: /blog/%postname%/

    Site URL: https://bevoja.us9.instawp.xyz/

    Posts (Blog) Page: https://bevoja.us9.instawp.xyz/blog/

    Sample Post URL: https://bevoja.us9.instawp.xyz/blog/quid-enim-lorem-ipsum-dolor/

    As you can see, I used the slug for the Posts Page (blog) in my custom permalink structure (/blog/%postname%/), but still got the individual post permalinks to work.

    Did I miss something in your problem description?

    Thread Starter rosko34

    (@rosko34)

    George thank you very much for taking the time to test and confirm that.

    I believe you have understood the issue and it is working for you.

    So it appears to somehow be an internal issue with my WordPress site as I cannot get the individual permalinks to work like that when the slug is the same as the posts page.

    Thread Starter rosko34

    (@rosko34)

    So after lots of tests, even I can’t replicate the problem.

    I actually have a slightly older staging site already setup, and the simple task of adding a custom structure working fine. But on the live site it’s not working, the same 404.

    I’ve tried different word variations, but ultimately when the posts page slug is the same as the custom structure parent, it does not work on the live site. Even on safe mode, all plugins disabled and wordpress theme activated.

    Page Not Found 404 – This page could not be found. Maybe try a search?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 Error with Custom Structure for Posts in permalink to match blog slug’ is closed to new replies.