WordPress.org

Forums

Exclude Subpages from being added to bar in MX4 (4 posts)

  1. jet3004
    Member
    Posted 10 years ago #

    How do I exclude subpages from being automatically added to the menubar in MX4? Thanks!

  2. Minna
    Member
    Posted 10 years ago #

    If you want to exclude all subpages, wp_list_pages has a parametre depth (if you set it to 1, it'll only show the top level pages). If you want to exclude some and include some, you need to use the exclude parametre and list all the page IDs you want excluded.

  3. jet3004
    Member
    Posted 10 years ago #

    Yes, I want to exclude all subpages. I see this depth stuff. Now can you walk me though it a little about what goes where? I've been copying and pasting all morning to no avail. Thank you!

  4. moshu
    Member
    Posted 10 years ago #

    An example of the very basic form of the template tag:
    <?php wp_list_pages('title_li='); ?> - you should add:
    <?php wp_list_pages('depth=1&title_li='); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags