• I’m currently installing main navigation on my site:
    https://www.mohrdesigns.com/consumer-products

    code in header file:

    <ul id="nav" class="solidblockmenu">
    <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1'); ?>
    </ul>
    
    <?php if($post->post_parent)
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    if ($children) { ?>
    
    <ul id="subnav">
    <?php echo $children; ?>
    </ul>
    <?php } else { ?>
    <?php } ?>

    This does everything I want it to do EXCEPT I want to allow the user the ability to roll over any of the top level (parent) links and they can then view the second level (child) links. Regardless of what page they’re on. How can I do this?

Viewing 1 replies (of 1 total)
  • May I refer you to this thread? https://www.ads-software.com/support/topic/318146?replies=4

    Bottom line: writing your own drop-down menu is something I tried and it worked. BUT only on IE8! Getting it to work on all browsers is tough and best left to a plug-in where someone spent the time to make it work on all browsers.

    In case it isn’t clear in that referenced post: the php code is relatively easy. It is the CSS (style sheet) coding that almost kills you to get right for all browsers.

Viewing 1 replies (of 1 total)
  • The topic ‘Main with secondary navigation using parent and child’ is closed to new replies.