404 on child page when parent page slug is identical to custom post type

The internet is swamped with this issue but all the results were from 2010-2011 so I wanted to check if there was any advancement in the matter.

I have the following scenario:

  • Created a custom post type “videos”
  • Created a parent page “Videos”
  • Created a child page “New Video”
  • Changed permalinks to %category%/%postname%

WP automatically created the permalink for the child page as www.example.com/videos/new-video but the page leads to a 404 Not Found error.

  • Re-saving permalink settings does not solve the problem
  • Changing the parent page slug to “videoss” solves the problem
  • Changing the custom post type to “video” solves the problem

Is there any way to have both custom post type and parent page slug set to “videos” under the aforementioned permalink structure?

Solutions Collecting From Web of "404 on child page when parent page slug is identical to custom post type"

I ended up changing the post type to ‘video’ to avoid the slug conflict with page ‘Videos’.

I it a WP default behavior to give priority to the post type over the page slug:

How to make pages slug have priority over any other taxonomies like custom-post, post or category