In wordpress I know it’s possible to output a nested navigation by indenting pages in appearance->menus and adding some code to the functions.php file. But I want to automate this.
In my site a top level nav shows all the top level pages. I’ve created a left menu that shows secondary level items for that section and then tertiary level items when a user clicks on a second level item. I’ve created this by adding the menu in appearance->menus and manually indenting pages.
I want the left nav to show automatically. So no need for creating the nan in appearance->menus and I want users to be able to add new second level items and third level items and the nav gets updated automatically – without the need for the user to go in to menus and add the item. So when a user clicks upon my products section in the top nav they get all the nested pages under that section in the left menu
Is this possible?
Thanks
It seems there is a definitive answer to this question so I’m posting here for anyone else with a similar problem.
Use wordpress wp_list_pages to list child pages:
http://codex.wordpress.org/Template_Tags/wp_list_pages. You can set the depth to show as many levels as you need.