• Resolved xmatter

    (@xmatter)


    i have search for an answer for my question, including here:
    https://codex.www.ads-software.com/Template_Tags/wp_list_pages#List_Sub-Pages

    but could not find it. here goes:

    Currently I have:

    30 parent pages
    -30 1st level child pages
    –30 2nd level child pages for each 1st level child page

    When one parent page is clicked, i want only the 1st level child pages to be displayed within my div#main area.

    THEN******************

    When a 1st level child page is clicked i want the 2nd level child pages to be displayed in div#main area.

    What wp_list_pages code must i use in order to accomplish this?

Viewing 1 replies (of 1 total)
  • Thread Starter xmatter

    (@xmatter)

    well, i have tried my novice programming skills and figured this out. i used: <?php wp_list_pages('child_of=10&sort_column=post_title&title_li=&depth=1') ?>

    for the parent page with a depth of 1 and then used the common list child pages code for the 2nd level child pages. I have created a “page template” for each parent and 1st level child page.

Viewing 1 replies (of 1 total)
  • The topic ‘parent and child page listing’ is closed to new replies.