WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] SUB NAVBAR, Display only 1 level of sub pages.

[Resolved] SUB NAVBAR, Display only 1 level of sub pages.

  • I have three levels of pages (NOT categories).
    Parent pages, sub pages, and sub-sub pages.
    I have created a two tier nav bar. The second tier should display all the sub pages of the current parent page. If I click on a sub page, the second tier should STILL display all of the sub pages of the original parent page.
    It should not, however, display the sub-sub pages. I do not want to display these pages.

    The code I have at this point is: http://pastebin.com/9Gv9ktBF

    Does anyone know a modification I can apply to achieve this?
    Or if you have a completely new code that will do what I am looking for?
    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Figured it out.

    Instead of this: wp_list_pages(“title_li=&child_of=”.$

    put in a parent=’ thing.

    Like this yeah : wp_list_pages(“title_li=&child_of=&parent=”.$

    Only allows it to go down to the sub pages below.

    Figured it out.

    Instead of this: wp_list_pages("title_li=&child_of=".$

    put in a parent= thing.

    Like this yeah : wp_list_pages("title_li=&child_of=&parent=".$

    Only allows it to go down to the sub pages below.

    (forgot the backticks in my previous post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] SUB NAVBAR, Display only 1 level of sub pages.’ is closed to new replies.