If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #24942

    hi i like to change the displayed pages on th default page sidebar.

    normally all the pages in one level are listed including their childs.

    i like to only show the current page with all of the childs.

    i am pretty sur this can be easily done by putting something in between line 33 til 55 in the sidebar.php

    best regards#thomas


    for example at it-findik.net/service-consulting it should show only the child pages:

    Planung & Beratung

    Hardware-Vertrieb & Einkauf


    Fernwartung & Vor-Ort-Service

    i managed this by deleting line 39 – 44 of the sidebar.php but if you click on a child page the navigation in the sidebar gets lost all the time.

    so far



    The only quick solution would be to hide the other pages with css. You can hide all links with

    .sidebar .widget_nav_menu .page_item{
    display: none;

    Then use following code to display the current page (and it’s ancestors or children)

    .sidebar .widget_nav_menu .current_page_parent.page_item, .sidebar .widget_nav_menu .current_page_item.page_item{
    display: block;


    hmmm, this does not work on my side.

    at the parent page, the current parent is displayed.

    at the the child page, nothing is displayed.

    maybe we need a longer solution ;-)





    Did you revert the changes in sidebar.php?







    I think I found the problem and corrected the css code above. There was a redundant space between .current_page_parent and .page_item




    hey peter,

    i checked for myself and found a great solution:

    ul.children {display: none;}
    .current_page_item ul.children,
    .current_page_parent ul.children {display: block;}

    works great and is more clear for the viewer.

    best regards




    Glad you found a solution. However I think it’s too simple – it maybe affects the main menu at the top – thus I’d include some selectors to be on the safe side.



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

The topic ‘change level of sidebar navigation’ is closed to new replies.