• Resolved eaven

    (@eaven)


    Hello, i am currently using the code below for my nav bar, i have a problem with it tho, it displays the parents as the main nav bar menu items, but when you hover over it, it shows child pages and grand child pages of the child pages, i would just like it to show the child pages… i thought depth=0 would take care of this…

    this is my first time attempting wp-ninja’ish stuff… please bear with me.

    <?php
    $thepostid = $post->ID;
    if ($thepostid!=0)
    wp_list_pages('title_li=&amp;depth=0&amp;sort_column=menu_order&amp;child_of='.$thepostid);
    ?>
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter eaven

    (@eaven)

    for example i have:

    Prophecy Seminars
    Pastor Stephen Lewis
    Pentecost 2000
    Meeting 01
    Meeting 03
    Meeting 03

    i only want the navbar to display

    Prophecy Seminars
    Pastor Stephen Lewis
    Pastor Doug Batchelor

    on every page, no matter if im in a grandchild of the child.

    Thread Starter eaven

    (@eaven)

    anyone?

    I believe if in the wp_list_pages line you change depth=0 to depth=2 it will give the result you are looking for.

    Thread Starter eaven

    (@eaven)

    yea i was reading that on the help for wp_list_pages and i tried it, but it still shows the grandchild and great grandchild pages ;x

    try depth=1 then and see what happens

    Thread Starter eaven

    (@eaven)

    well i noticed that once i loaded one of my pages with a movie clip embeded the drop down would go behind the movie, so i just ripped it all out, and made them all just static links to the parent pages… sorry to waste your time steve ;D

    try extended categories plugin it is so convenient and you dont have to be adding codes or anything..

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HELP: Only list Parent and child of parent in navbar, no grandchildren’ is closed to new replies.