The strangest thing is happening.

I have a page that I want to assign a parent page to. When I assign a specific parent page to it, then the page shows a 404 error.

Here is the weird thing, this only happens when trying to assign one specific parent page. Any other parent page is just fine.

Example: www.website.com/city (my new page) www.website.com/locations (old page that I want to be the parent page) www.example.com/locations/city (what the URL should now be with the parent page, but getting a 404 error)

I can assign any other page as a parent and I do not get a 404 error. Example like these are just fine: www.example.com/about/city (this works just fine) www.example.com/anypage/city (this works just fine) ect...

So it's ONLY when assigning the /locations/ page as the parent, I am getting a 404 error.

Any ideas why this would be happening, and any suggestions for a fix?

  • Do you have a custom post type called locations? If you do then the URL would conflict with a location post of the same name. The locations page itself might still work because the post type does not have an archive enabled. Commented Feb 19, 2019 at 14:54
  • Make sure your parent page is published. Make sure you don't have any conflicts at that url. Extending what @JacobPeattie mentioned, what happens when you visit /locations/ without a page assigned? Commented Feb 19, 2019 at 16:38

2 Answers 2


PLUGIN 1: After looking into this site further, I noticed I have a plugin that has created a section in the sidebar called "Products". Within the "Products" section is a category labeled "Locations". This is creating the /locations/part of the URL. There are several pages like the example www.example/locations/city-state. This is for a filter based search on the website to see products, and locations some of the products are at.

PLUGIN 2: There is another plugin that was installed for a Google maps locations page. This is the www.example.com/locations/ page I mentioned in my original question. When you visit this page you can see a map with several location map markers on it. You can also see a specific location on the map by using a state dropdown option.

These two plugins are completely separate and serve different purposes (PLUGIN 1 is for products and locations of each product, and the PLUGIN 2 is only to show store locations).

With that being discovered, I don't think I will be able to use /locations/ as a parent page even though that is an actual page. And I won't be able to have the store location URLs as I originally wanted....www.example.com/locations/city, www.example.com/locations/city2, www.example.com/locations/city3.

I hope that all makes sense. Fyi....I took over this website a couple months ago and was not aware with how some of the customizations were set up. Whoever setup the /locations/ store locator map page, should have used a different path such as /our-locations/ for example.

  • Had to post the above as an answer since the content was too long.
    – Webman
    Commented Feb 20, 2019 at 21:28

Just to confirm the solution: I had this same issue and the problem was, in fact, that I had a custom post type that had the same name as a parent page/directory.

So, in my case, I had www.mydomain.com/policies/ and a CPT called "Policies," so any child page in the policies directory would throw a 404.

My solution was to update the slug for the Policies page (in my case to www.mydomain.com/anywordhere-policies/) and that immediately solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.