WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multiple navigation bars, need help... (4 posts)

  1. Spencer Hill
    Member
    Posted 4 years ago #

    Heya - so I'm working on a site where I have a top and side navigation bar. The problem I'm encountering is I don't want the side navigation bar to include any of the pages that are listed in the top navigation - nor their children. But I'm not sure how to accomplish this, can anyone help? Thanks!

  2. EMG
    Forum Volunteer
    Posted 4 years ago #

    You can create navbars to display menus/navigational links to ANYTHING, not just pages or posts in WordPress. :)

    What exactly are you wanting to display in your bar?

  3. Spencer Hill
    Member
    Posted 4 years ago #

    Oh I'm just trying to display pages.

    I discovered I can use the exclude_tree command and that does the job. Though, there is a bug open for it as of 2.8.2 that prevents this from working properly so you have to comment out this line: $r['hierarchical'] = 0; in wp-includes/post-template.php

    So when you write wp_list_pages('exclude_tree=2'); it excludes that item and all of it's children, thus, problem solved.

  4. Hesadanza
    Member
    Posted 4 years ago #

    Commenting out that line does not seem to work for me. How do I exclude a tree of pages from navigation when exclude_tree doesn't work?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.