• currently, if you want to use ‘top level’ pages as categories, you can build your sidebar on demand with extensive use of the exclude page parameter.

    for example:
    wp_list_pages(‘exclude=48,49,44,17,26,30,31&sort_column=menu_order&title_li=stuff i like:’); wp_list_pages(‘exclude=48,49,44,9,8,26,30&sort_column=menu_order&title_li=stuff i hate:’); wp_list_pages(‘exclude=48,49,44,9,8,17,31&sort_column=menu_order&title_li=other stuff:’);

    basically, this creates a category title (ie, ‘stuff i like:’ and displays all non-excluded pages and their children.
    for example, the first part of my side bar is:

    stuff i like:
      page 9
         page 14
         page 11
       page 8
         page 19
         page 18
         page 45

    stuff i hate:
       etc.
    etc.

    unfortunately, everytime i add a page, it propagates to every subheading i just created. so, for example, if i create a page called ‘about me’ (id=99) that doesn’t belong on the sidebar at all, it will first exist under every heading created above.

    stuff i like:
       !!!about me
       page 9
         page 14
         page 11
       page 8
         page 19
         page 18
         page 45

    stuff i hate:
    !!!about me
    etc.

    i then need to go into each function call and exclude page 99 where necessary.

    is there any hack/plugin to add a ‘include’ parameter that includes a page AND its children? (i did read another post here asking a related question that was unresolved – but i thought maybe giving this illustration might help)

    the code i would like to write would be:
    wp_list_pages(‘include=9,8&sort_column=menu_order&title_li=stuff i like:’);

    this way, when i add a new page it doesn’t end up everywhere. i would simply add it as a child to 9 or 8 if i want it there. the only time i would need to change code would be if i wanted a new top page under ‘stuff i like:’

  • The topic ‘pages and their children’ is closed to new replies.