Forums

having the subpages in the navigation of the proper parent page (3 posts)

  1. A2annie
    Member
    Posted 3 years ago #

    Hi-

    I have selected a template but am attempting to modify it. It was the closest I could find!

    What I would like to do is have some of my pages have sub-pages show up in a sub navigation. Right now the code I am using is:
    <?php wp_list_pages('title_li=&depth=1&sort_column=menu_order&' .$page_sort)?>

    But this just list the pages and is not what I want. I'd like this to behave just like a regular web site. When you click on a page , there may be sub pages that you can access.

    See: the site for a visual.

    Thanks in advance for your help.

  2. MadsK
    Member
    Posted 3 years ago #

    Try this

    wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->ID.'&depth=0');

    It graps the current ID of the page your in and shows the childs (subpages) of that particular page only!

  3. A2annie
    Member
    Posted 3 years ago #

    i think i love you.
    no seriously thanks!!!

Topic Closed

This topic has been closed to new replies.

About this Topic