Skip Navigation

[Resolved] How to display child pages

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

Problem:
Client is adding hierarchical pages, and on one page wants to list its child pages.

Solution:
Add a View with a Query Filter to only shows pages for whom the current page is parent.

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

This support ticket is created 6 years, 7 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 5 replies, has 2 voices.

Last updated by veronicaM 6 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#919079
Page List .png

I am trying to: I am attempting to get the pages that house my weekly modules (i.e "Dating w/ LOVE + Logic! Week 1") to display in a list on my "Weekly Modules" page. I've not been successful in doing so.

Link to a page where the issue can be seen:
hidden link

You will need to use these credentials (don't judge me) to log in as this is being set up for my membership site.

I expected to see:

The list, which is only one Page/Module for now under the heading "Weekly Modules." I also noticed that when clicking on the link the actual module is an additional two steps away. Is there a way for me to make it where once I click on "Dating w/ LOVE + Logic! Week 1" it opens to the attachment?

Instead, I got:

What actually appears along with the Title and Link is seemingly every single link on my website. Also, too many hops until my end user actually gets to view the module.

#919173

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Veronica

I tried to look at the back end to see how this is set up and how it relates to your membership plugin, but I couldn't access the WordPress admin.

Can I set up a private reply so that you can provide credentials for admin access? You may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes.

I have edited your original post to remove the credentials for the site member, this is a public forum, and we need to set up private replies for when you have sensitive information to share.

#919320

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-06-29 at 14.01.19.png

Hi Veronica

I'm not sure what you are aiming to do.

You have the following hierarchy of static WordPress pages:

Dashboard for Dating w/ LOVE + Logic!
-- Weekly Modules
-- -- Dating w/ LOVE + Logic! Week 1

You created a View to list pages (all pages), and then you inserted that View onto the Weekly Modules page, which therefore shows all of the pages on your site as links.

If you wanted to show only the sub-pages of the Weekly Module page (where you insert the View) then you could add a Query Filter so that it only shows pages for whom the current page is parent, i.e. show child pages (see screenshot).

I've done that on your site, delete it if it is not what you require.

(I also added some paragraph tags around the wpv-post-title shortcode so they appear on separate lines.)

See the following for details:

https://toolset.com/documentation/user-guides/filtering-views-query-by-post-parent/
https://toolset.com/documentation/user-guides/digging-into-view-outputs/

#919495
Weekly Modules.png

Thank you Nigel! What you did definitely satisfies most of what I was looking to do. I have a question, is there a way to remove/hide "Weekly Modules" (see attachment) as an item in the list view? I will have 3 other columns with content so I can't make the parent the actual Dashboard.

#919946

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Double-checking your site, you have the wpv-post-link shortcode beneath the View on the weekly modules page, so a link (to itself) is added to the page, I think that is what you have highlighted in your screenshot.

If you don't need it, delete the wpv-post-link shortcode.

#920563

That did it! THANK YOU!!!!!