WordPress.org

Ready to get started?Download WordPress

Forums

subpages list on subpages (4 posts)

  1. mlavdh
    Member
    Posted 8 years ago #

    Hello,,

    I have made the following structure

    Page a
    --subpage1
    --subpage2
    --subpage3

    <?php if (is_page()) { ?>
    <?php $g_page_id = $wp_query->get_queried_object_id(); ?>
    <?php the_title('<h2>', '</h2>'); ?>

      <?php wp_list_pages("depth=1&title_li=&child_of=".$g_page_id."&sort_column=menu_order"); ?>

    <?php } ?>

    with this code i found on this forum i manage to display the subpages on page a but i also want to display a menu with subpage 1,2,3 on every subpage. Can anyone help me with this problem?

  2. moshu
    Member
    Posted 8 years ago #

    [don't double post - it will be deleted!]

  3. mlavdh
    Member
    Posted 8 years ago #

    sorry

  4. mlavdh
    Member
    Posted 8 years ago #

    i'm now using this

    <?php wp_list_pages("child_of=$post->ID&depth=1&title_li="); ?>

    but i still don't know how i can see if a page is a child-page and if there are other child-pages.
    and if you can make a list with these chil-pages on a child page

Topic Closed

This topic has been closed to new replies.

About this Topic