Support » Fixing WordPress » current_page_parent displaying subnav of other items at 3rd level

  • Hello,

    I recently updated my theme and my WP installation, so I am not sure which caused this problem, but it was working fine. Mainly, my side navigation used to display (top and sub-levels) and highlight appropriately (current page item), then it started doing this weird thing that when you clicked on a parent level, or a subnavigation menu item that was in a submenu already displayed, it reloaded the entire side menu again. To fix this I used the following code:

    #left ul li ul{ display: none; }
    #left li.current_page_parent ul { display: block !important;}

    This seemed to do the trick, and it does for the first and second levels of my side navigation, but when you drill down to the third level and below, all of the third level menus get displayed, even for items that are not currently active.

    This code fixes that:
    #left li.current_page_parent ul.children li.current_page_item { display: block !important;}

    But then you get the reloading of the entire menu again. If you look here you will see what I mean:

    I hope this makes sense, and if anyone can help out I would really appreciate it, I am stuck.


Viewing 5 replies - 1 through 5 (of 5 total)
  • No one can help? This is driving me nuts…


    Same problem overhere, with wp_list_pages, i’m using:
    <?php wp_list_pages(‘title_li=&depth=0’ ); ?>
    this makes an extra ul li altought there no child items, so for example for the home:

      <li class=”page_item page-item-2 current_page_item”>Home
      <ul class="page-item-2"><li></li></ul></li>

      I’ve seen this for the first time, with other websites (hosted at different hosting providers i not come across this problem..).
      So I suspect this has something to do with the host (php version??)

      Ron Mosss

    Ron, check the other feed for a response to your problem, which is quite different than the one I am having.

    Someone suggested it might be my version of PHP (5.2.4-2), but I am not sure what to do to fix it? Or what version to change it back to…?


    I tried using:

    #left li.page_item ul {display:none;}
    #left ul li.current_page_item ul, #left ul li.current_page_parent ul {display:block;}

    But it seems I can either show all of the sub-subnavigation menus for the current page item,
    or I can only display the sub-subnavigation of the current page item, but the entire side menu reloads. I’ve tried all kinds of plugins but seem to have the same problem every time.

    Any thoughts?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘current_page_parent displaying subnav of other items at 3rd level’ is closed to new replies.