One of my premium support members requested a fix for their menu which was using the built-in WordPress wp_list_pages() function to display it’s menu contents. The menu was to include only five menu items, with dropdown menus. The contents of the dropdown menus was going to grow continuously as new pages were added to the site so they wanted the menu to automatically grow as the new pages were added, rather than having to manually add the pages into their menu over time. This is not possible with wp_list_pages() as the “include” parameter only includes the exact page IDs you specify rather than including their nested pages as well.

To get around this issue, we created a new function which allowed them to specify only the top level menu items that they wanted to display, the result of this is the List Nested Pages plugin. This was built with a specific use case in mind, but in case anyone else has a use for it, we have released as a WordPress plugin.

Visit the Nested Pages plugin page for more information and to download the plugin.