• Objective: display parent and child pages of the current page only.
    When I try:
    <?php wswwpx_fold_page_list ($arglist); ?>
    I get a full listing of all the parent and child pages site wide.

    When I try:

    <?php
    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children) { ?>
    <ul>
    <?php echo $children; ?>
    </ul>
    <?php } ?>

    I get nothing.

    I tried fold_page too.

    <?php wswwpx_fold_page_list ($arglist); ?>

    This displayed all parent pages site wide but no child pages.

    I tried a modification I found somewhere that was supposed to show only the current parent and its children but that, as with wp_list_pages displayed nothing. I can’t find it to show here.

    It seems like there’s something with my theme or set up of wp that might be causing it? I’m using a modified (by me) Ajax-Berlee.

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php
    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children) { ?>
    <ul>
    <?php echo $children; ?>
    </ul>
    <?php } ?>

    You get nothing because you didn’t change ID with your current ID(number) page. ??

    Thread Starter wildhorses

    (@wildhorses)

    Thanks. A lot. I don’t know what that means, obviously.

    What ID? Where do I find the ID? I am putting this in the sidebar–do I need a different side bar template for each parent page–ID? where I want to show this kind of menu?

    Your tolerance is appreciated!

    A nice read for you ??
    https://codex.www.ads-software.com/wp_list_pages
    Look at the examples provided.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘fold_page and wp_list_page won’t display child page only’ is closed to new replies.