0

I'm starting development on a WordPress site soon. For a specific post type, they want the archive to be part of the page structure.

For the default post type, you can set the archive to a static page, and the parent-child structure of the pages is kept.

Does WordPress offer a way to do this natively, maybe at the registering of the post type? Googling things like 'set custom post type archive to specific page' yields no results. I have not tried anything yet, because I wouldn't know where to start with this and would like to get some information on whether it is even possible within the scope of WordPress. If it is possible, where would I start?

To clarify: Let's say I have a page, Foo, it's slug being /foo. This page has a child page Bar, it's slug thus being /foo/bar. I want the archive page of my custom post type to be set at /foo/bar, like you could do with the default post post type (this would be done via Settings > Reading, but that's not important).

I can't write a custom query in a template, because that would not fix the breadcrumbs structure that a plugin like Yoast would display.

12
  • > Is it possible to do this for a custom post type, too? "Yes." Was it the answer you where waiting for?
    – Max Yudin
    Oct 9, 2018 at 22:32
  • What have you googled and tried already? Please, show us.
    – Max Yudin
    Oct 9, 2018 at 22:35
  • 1
    @MaxYudin I've updated my question, I realise I was kind of unspecific. You could try telling people this in a nicer way, in stead of giving some passive aggressive answer.
    – Connor
    Oct 10, 2018 at 8:11
  • 1
    Possible duplicate of Use WordPress page instead of post type archive
    – Pim
    Oct 10, 2018 at 8:11
  • @Connor I agree the comments are a bit cold sometimes. Bear in mind we get a lot of "Please help me put my header 2 pixels down" type questions on here, and questions that have already been asked, so it can get frustrating after a while.
    – Pim
    Oct 10, 2018 at 8:14

0

Your Answer

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