How to show ONLY top-level pages in the menu? (4 posts)

  1. equinestaff
    Posted 2 years ago #

    I don't want to use the custom menus as i'm already using this to control my buddypress activity menu, so i want to only show my top level pages in my main menu. I can see on this page

    that i can set the depth to 1 to do this, however i have no idea what file to edit to find the depth to set it to one.

    I have checked allot of pages including my style.css and header but i can't find it anyway.

    Thanks in advance.

  2. The code should be in your header, but it depends on your theme.

    If your navigation is under your logo, look in the header.php and just insert something like.

    <?php wp_list_pages('depth=1&title_li='); ?>

    And just see what that does. If you have 2 menu bars, then you'll need to find the other one and just delete. It's just a matter of treating it like a puzzle. Just take out pieces and see what happens. Of course, when you do this, you should also make a backup.

  3. equinestaff
    Posted 2 years ago #

    No luck, this just caused errors on my page, i have the WPMU Dixi theme. Any other ideas, i'm not that good at the coding side of things.

  4. equinestaff
    Posted 2 years ago #

    Actually, I'm thinking how can i just add the menu straight into the header directly without using the custom menus or putting the pages in order as when i install the BuddyPress Custom Profile Menu my buddypress menu and the normal menu end up the same, it may be a buddypress question, so i will post it there aswell. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic