I’m wondering what is the proper way to use depth n in wp_list_pages. I currently have a menu in my sidebar that goes 4 levels deep but I’d like to prevent levels 3 & 4 from displaying.
The codex says:
- Limit length of first excerpt in the loop
- How to slow down server response
- How to arrange PHP files to allow for multiple types of pages
- functions.php is being included twice, creating PHP fatal errors
- mysql custom wp query
- How to assign classes to all elements?
(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.
I can’t seem to find any examples on how to use depth in this instance.
depth=n2 should be
n is just a “placeholder” and should be replaced by the actual integer value of your choice