I am building a website for a public school district. All of our school buildings have common pages with the same name (i.e. Library, Nurse, Attendance, etc) that are nested under their parent building’s page. While trying to update our site navigation, I’ve noticed that for some reason the Menus -> Pages -> View All area is not nesting the building pages under their building and is instead listing them alphabetically.
Am I missing something? I can’t find anything different about the way I nested the pages that do display properly vs those that don’t. I double checked the nested pages and they have their building listed as their parent.
I find this extremely frustrating. Unless I go in and edit all of the pages under a specific building to force them into the recent list I have no idea which page is which.
- I do NOT want to add the building name to each page title.
- These pages are nested 3 levels deep (Schools -> Building Name -> Page Name)
If there isn’t a way to fix the way the list displays, is there maybe a way to add the parent page’s name to the page name? Or another way to build the menus?
The function you’re looking for is
Pay particular attention to these two arguments documented on that page.
depthbeing the most relevant to your question.
‘depth’ (int) Number of levels in the hierarchy of pages to include in the generated list. Accepts -1 (any depth), 0 (all pages), 1 (top-level pages only), and n (pages to the given n depth). Default 0.
child_of, giving you the option to list only those that are children of a specific parent page that you have; i.e., a specific building’s child pages.
‘child_of’ (int) Display only the sub-pages of a single page by ID. Default 0 (all pages).