The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

has_child conditional tag? (1 post)

  1. Drew Baker
    Posted 6 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!


Topic Closed

This topic has been closed to new replies.

About this Topic