Skip Navigation

[Resolved] Only include Parent pages in Archive list

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 1 year, 9 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2637723

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.

#2638129

Christopher Amirian
Supporter

Languages: English (English )

Screenshot 2023-08-28 at 10.35.45.png

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.