• I recently changed the slug of one of my parent pages – for example sake, let’s say I changed it from “test-page” to just “test”.

    Sometime after doing so (Im not sure if it was immediate), all of the sub-pages under it come up as “page not found” when trying to access them. The links are redirecting to /test/ and as I would expect, I can no longer access the pages when manually entering /test-page/.

    If I rename the parent page slug to anything else, the sub-pages work. If I move the sub-pages to any other parent page, the sub-pages work. Searching for the site lists the sub-page in the search results with the link including the new “/test/” slug – but again, comes up with page not found when I click it.

    I even tried creating a new page from scratch using this slug (“test”) and anything I put under it still comes up with page not found.

    Anyone have any thoughts on how to fix this? Unfortunately using an alternate slug is not an option for what I need to do.

    Thanks a bunch in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter timofcourse

    (@timofcourse)

    *Bump*

    Anyone have any thoughts on this? Thanks a bunch!

    Same issue here, did you find a solution?

    Ok I haven’t *solved* this per say but I have come up with a solution.

    Basically I am getting page not found for any sub pages where the permalink is not the default.

    Ie. if I had a page called “Page One” the default permalink would be “page-one” if however I had changed this to just “one” or anything else the sub pages would show the page not found error. It I change the parent page permalink back to “page-one” the error goes away.

    I don’t know why this is all I know is to stop the error from happening you need to use the default permalink for the page which is essentially the same as the page title.

    I hope this helps someone not waste time like I have.

    Nicole

    Nicole I have the exact same behaviour as you are describing, weird. The parent page’s title is “The Team” but I want the path to just be “team” so I changed the slug thusly, but that’s when the 404s in all the sub pages started happening. Resetting the slug to “the-team” (default) fixes the issue. But I don’t want “the-team”!

    Hi Guys, it happend to me too, but I don′t remember witch was the previwer adress. And I don′t Know how to make a page with any adress, it′s on permanent link and I can′t find how to back to the first way. Can you help me please?
    thaks,
    Flávia Paiva

    Let me share my findings with this thread:

    I found out the source of the problem was that my custom post type teammember‘s slug as defined in functions.php (i.e. “slug” => “team“) was conflicting with the slug of the subpage I had created (i.e. /team/blabla/). So, I suppose WP’s rewrite functionality cannot handle when it sees a url like /team/blabla/, it doesn’t know if “blabla” is the name of a subpage I manually created under the “team” page, or if it’s the name of an item of custom post type “team”. Apparently it gives the custom post type slug priority over the subpage’s slug, which is why it couldn’t deliver me the subpage blabla and gave me a “Not Found” page instead.

    My workaround was to change the custom post type’s slug to be team/member (i.e. ‘slug’ => ‘team/member’) so now I can safely create any number of pages with a slug format of /team/xxxx/ without having to worry about a conflict with my CPT’s slug (just as long as I don’t give my subpage a slug of /team/member/, obviously :P)

    HTH others!

    Thank you indorock you just solved a mystery for me that I’ve been puzzling over for the last day. I’m using a premium theme from Obox called Knead which includes three custom post types: Portfolio, Quotes and Services.

    I discovered that if I had a page with a slug of ‘portfolio’ then all the sub-pages resulted in a 404 error. Your post pointed me in the right direction, thank you. I changed the slug to ‘my-portfolio’ and lo! and behold! the rest of the sub-pages started working ok.

    Thank you, once again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘"Page not found" for sub-pages of specific slug’ is closed to new replies.