WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Navbar sub-pages only displaying on parent page

[Resolved] Navbar sub-pages only displaying on parent page

  • treelovinhippie
    Member

    @treelovinhippie

    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

Viewing 1 replies (of 1 total)
  • treelovinhippie
    Member

    @treelovinhippie

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Navbar sub-pages only displaying on parent page’ is closed to new replies.