Forums
Home / Fixing WordPress / Suppress child pages in sie bar menu
(@kdruhl)
15 years, 1 month ago
Dear friends,
is there a way to suppress the listing of child pages in the sidebar menu, so that only the top level parents are listed?
Many thanks for your help!
(@michaelh)
The template tag, wp_list_pages(), offers the depth=1 argument to satisfy your need: Example:
wp_list_pages('echo=0&depth=1&title_li=<h2>Top Level Pages </h2>' );