WordPress.org

Forums

[resolved] Navbar sub-pages only displaying on parent page (2 posts)

  1. treelovinhippie
    Member
    Posted 6 years ago #

    hi

    I have a navigation bar with some top-level pages and 1 layer of sub-pages. However the sub-pages are only visible (on-hovering over the parent page link) while on the parent page. i.e. on the homepage I can't see any sub-pages in the navigation.

    I've been fiddling with my code below to no avail...

    <ul id="nav">
                        <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?>
                        <li class="<?php echo $highlight; ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li>
                        <?php
    wp_list_pages('sort_column=menu_order&depth=3&title_li=&exclude='.get_option('nav_exclude'));
    		?>
                    </ul>

    Any help would be muchly appreciated.

    cheers

  2. treelovinhippie
    Member
    Posted 6 years ago #

    ahahaha, I'm using the eShop plugin and it has an option saying "Hide sub pages from menu until top level page is visited."... select No, done. Hate it when those little things distract.

Topic Closed

This topic has been closed to new replies.

About this Topic