WordPress.org

Ready to get started?Download WordPress

Forums

has_child conditional tag? (1 post)

  1. Drew Baker
    Member
    Posted 4 years ago #

    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!

    -Drew

Topic Closed

This topic has been closed to new replies.

About this Topic