• Hi folks,

    I output the first Subpage of any given Page (I have found the iinclude plugin and got that part to work), but right now I am doing that with a tedious hard-coded loop.

    How can I access a given Pages children (their IDs, basically, is what I want to query)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Cathy Mitchell

    (@multitalentedmommy)

    Are you looking for a variable to return to another expression? or something that you want to show up on your page? Ie: the child cat’s name? ID? Are you looking for the CURRENT page’s child/ren? or a link’s?

    Thread Starter kontur

    (@kontur)

    This “iinclude” plugin let’s you include any created Page in your template by handing it the ID of the Page you want to include.
    So, on my Parentpage, I would want to include possible Childpages, meaning I would like to find the Subpages of the Page I am currently on.

    If my Pages’ IDs and hierarchy were:

    /mainPage ID1
    /mainPage ID1/subpage ID4
    /mainpage ID1/subpage ID5
    /mainPage ID2
    /mainPage ID3
    /…

    I would want to get a “4” (and possibly “5”) returned, when browsing mainPage with ID1.

    A bit like “$post->ID”, but finding the current Pages children and not its own ID.

    Any help greatly appreciated,
    k.

    Cathy Mitchell

    (@multitalentedmommy)

    I’m afraid I’m not a plugin author – what does the “include” plugin author say about this? Coding variables is a little out of my realm – some others do that around here though – anyone?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Finding Subpages to current Page on display’ is closed to new replies.