custom post types – Can I add a wordpress page using the slug for a CPT rewrite

Question

I have a custom post type rt_services. I have rewritten the slug to just services. I’m not using an archive so I created a page at /services and added code for a custom wp_query to call my custom posts. From there users can click to different services.

Ex Structure.

/services – is a page (not set as an archive) with custom WP_Query

/services/first-service

/services/another-service

This is all working properly.

I was hoping to be able to create a 2nd WordPress page about the packages (not CPT) called advice and place it under the services parent page. I don’t want it to show in any of the queries or loops for services which is why I don’t want it to be an actual service CPT. However its URL structure would be:

/services/service-advice

I don’t have a CPT called Service Advice (service-advice).

However I think WorpdPress is looking for it because when I click that link (or from the page edit screen if I click Preview page) it brings me to the 404 page instead. I did confirm that the page slug is correct too.

Is it possible to place a page as a child to a reserved re-write like this?

0
rudtek 2 months 2022-10-07T14:49:40-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse