Custom post type parent page exclude sub pages

OK I will try to explain as best as I can.

I have a wordpress site with the following page structure.

/parent/sub-page-1/

What I want to do is attach a custom post type to the parent page which I can using the following

‘has_archive’ => false,
‘rewrite’ => array( ‘slug’ => ‘parent’, ‘with_front’ => false ),

So if I add a post called article I can view it visiting

/parent/article/

This works fine except if I visit my exisiting sub-page-1 I get a 404 error.

Is there any way of excluding the sub-page-1 from being rewritten by the custom post type?

Thanks

Robbo

Read more here:: Custom post type parent page exclude sub pages

Leave a Reply

Your email address will not be published. Required fields are marked *