Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26229

    I have a client using the coherence theme and they would like the current page and sub pages to show on the nested Nav in the sidebar.

    Right now if you have about us and then two pages under it. When you go to the page you only see the under pages.

    one

    Two

    Client would like to see

    About Us

    one

    Two

    Where do I change the code to make the nested nav do that? Show current page and sub pages.

    #129756

    Please Help???

    #129757

    I need some idea as soon as possible. Client is getting frustrated?

    #129758

    Hi,

    You can use the Custom Menu widget to show the parent page and the sub menus.

    I’m sorry but what do you mean by

    About Us

    one

    Two

    ?

    Can you provide a screenshot?

    Regards,

    Ismael

    #129759

    The coherence theme is designed to automatically show on the right sidebar subpages of the current page you are on. So If I have an about page and then two subpages the theme automatically shows the sub pages in the right sidebar. However it does not show the parent page. My client wants it to show the parent and subpages in the sidebar.

    #129760

    Hi,

    Edit sidebar.php, find this code:

    $children = wp_list_pages("title_li=&child_of=". $parent ."&echo=0");

    if ($children)
    {
    $default_sidebar = false;
    $sidebar_menu .= "<div class='widget widget_nav_menu'><ul class='nested_nav'>";
    $sidebar_menu .= $children;
    $sidebar_menu .= "</ul></div>";
    }

    Replace it with:

    $children = wp_list_pages("title_li=&child_of=". $parent ."&echo=0");

    if ($children)
    {
    $default_sidebar = false;
    $parentpage = get_the_title($post->post_parent);
    $sidebar_menu .= "<div class='widget widget_nav_menu'><ul class='nested_nav'>";
    $sidebar_menu .= $parentpage;
    $sidebar_menu .= $children;
    $sidebar_menu .= "</ul></div>";
    }

    Regards,

    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Nested Nav’ is closed to new replies.