If exclude parent page from wp_list_pages, exclude child too (4 posts)

  1. xxangel
    Posted 7 years ago #

    Is there a way to exclude child pages from wp_list_pages just by excluding the parent?

    Pretend I have a page titled "About" with ID "5" and "Me" with ID "6". If I write:

    <?php wp_list_pages('exclude=5&title_li='); ?>

    The "Me" page still shows up as a link. Is there a way to do the exclude=5 and then exclude any pages under it?

  2. xxangel
    Posted 7 years ago #

    I forgot to add that I am using WP 2.6

  3. nsharp
    Posted 7 years ago #

    This used to work in WP 2.3. Apparently it has regressed in 2.6. I have not been able to find an answer yet. Good luck!


  4. teonsight
    Posted 6 years ago #

    In WP therei is exclude_tree but doesn't seem to work properly. Does it for you? Can you try it?

Topic Closed

This topic has been closed to new replies.

About this Topic