Tell us what you are trying to do?
I would like to only display Parent pages on an archive page for a custom post type, rather than all pages including sub-pages. Currently, the only archive I can generate shows all pages within that custom post type.
Is there any documentation that you are following?
No, no documentation is available.
Hi there,
You will not be able to do that with a WordPress Archive. Instead, you need to add a normal page and consider that as your basis for the listing, then you can add a View on that page and there you can select the post type and you will have a query filter option.
In the query filter option, you can select the "No Parent" checkbox to show only the top-level elements.
- Add a Query Filter.
- Select "Filter by: Post Parents".
- Select the "No Parent" checkbox in the filter.
Please check the screenshot. Thanks.