Skip Navigation

[Resolved] Show menu of sibling pages of the same parent page

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use hierarchical Pages to create parent and child Pages. On one child Page, I would like to show a View of sibling child Pages. On the parent Page, I would like to show a link to this child Page.

Solution: Blocks offers a hierarchical post parent filter that can respond to a URL parameter. The View portion of this problem could be solved in the Blocks editor alone without classic Views. However, to create the link to the child Page on the parent Page, you must use shortcodes to add this URL parameter to your child Page link on the parent Page, and use it to pass the current (parent) Page ID into the URL parameter. Then on the child Page, display a View of Pages filtered by parent post ID set by the URL parameter of your choice.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-post-parent/

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by a.R 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1595325

a.R

Hi, I would like to have a link on some pages(1) that allows the visitor to see a page with the content tree (sub-pages) of the first page(1).

So I think the new page would be a child-page of the page(1) an on that sub-page I would like to search for all sub-pages of that parent-page(1).

How can that be done?

#1595849

Hello, I think you would have to use URL parameters to set this up. There is a Post Parent query filter you can use to filter by hierarchical parent post, but there is no setting to choose the parent of the current post, which you would need to show a list of sibling posts on the child page. Instead, you could set up the query filter to respond to a URL parameter, and set up your links on the parent post to use the current page ID in a URL parameter when linking to the child post.

Let me know if you have questions about setting up a link with a URL parameter, or accessing that URL parameter in a post parent Query Filter.

#1596437

a.R

My issue is resolved now. Thank you!