Forums

[resolved] SUB NAVBAR, Display only 1 level of sub pages. (3 posts)

  1. jmadz1
    Member
    Posted 11 months ago #

    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.

  2. jmadz1
    Member
    Posted 11 months ago #

    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.

  3. jmadz1
    Member
    Posted 11 months ago #

    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.

Reply

You must log in to post.

About this Topic