WordPress.org

Forums

Suppress child pages in sie bar menu (2 posts)

  1. kdruhl
    Member
    Posted 6 years 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!

  2. MichaelH
    Member
    Posted 6 years ago #

    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>' );

Topic Closed

This topic has been closed to new replies.

About this Topic