Support » Themes and Templates » has_child conditional tag?

  • Hi guys,
    I’m trying to list all sub-pages of the parent, even when viewing a sub-page. There is code for it in the codex, but it doesn’t work when you have more than 2 levels of pages.

    So what I want to do is this:

    If current page has sub-pages, display only sub-pages and end. Else, if current page is a sub-page, then display all sub-pages of parent page and end.

    It seems to me it would be real easy if there was a has_child conditional tag.

    Does that make sense? Thanks for the help!


  • The topic ‘has_child conditional tag?’ is closed to new replies.