When you use include
parameter of wp_list_pages you are basically telling it to only include these certain Pages in the list.
you should use exclude_tree
instead, when using this parameter it will exclude a parent and all of that parent’s child Pages.
so something like:
$top_pages_to_exclude="1"; // the top page to be excluded ID, you can specify more then one '1,2,23'
$args = array(
'sort_column' => 'menu_order',
'depth' => 2,
'title_li' => '',
'exclude_tree' => $top_pages_to_exclude
);
wp_list_pages( $args );
Related Posts:
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- Number of items in a menu
- Can this navigation be done easily in WordPress?
- Set if condition with wp_nav_menu
- Auto add pages to primary menu with functions.php
- Disable most recent & view all (TABS) on nav-menu.php
- Change an li class name in a wordpress custom menu walker
- Home Custom Menu Link not Working
- Inserting specific images inside navigation menu
- Programmatically add existing pages and subpages to Appearance Menu
- two different separate sections on the same site
- Does is_child() exist in wp 3.5.1?
- How to add rel=”nofollow” to wp_list_pages?
- How can I add a delay to the collapsible menu in Twenty Eleven?
- How to get main menu only with wp_nav_menu
- wp_list_pages Hierarchical Help
- Add pages content to startpage through custom menu
- Remove the Tag from wp_nav_menu
- wp_nav_menu: output featured image of each page listing
- How can I order these pages in this navigation bar on this old wordpress theme?
- Unable to remove page from primary menu
- Walker_Nav_Menu Add Strings and Class Name
- Add default wp_nav_menu classes to my custom links
- Page and Posts loading as index page? Not loading the content
- How to add class and span to
- How can I set the first link in my nav menu to simply be a drop-down to some other pages
- how can i get the page_ID in nav li [closed]
- Split up wp_nav_menu with custom walker
- Listing pages which uses specific template [duplicate]
- Remember the last post I read
- Prev/Next child navigation for current page?
- How to move parent li to end of child ul
- Can you have different menus and theme on a per-page basis?
- Is it possible to show a different WP menu when using password protected pages?
- Custom Nav Walker sub-menu HTML construct
- Add class to menu ul with active child
- Make compatible custom menu widget for Twitter Bootstrap
- Different side menu on each page
- Create a Page via plugin
- How to display dynamic content in start_lvl function
- Disable automatig SVG tag from menu
- wp_nav_menu add some element to container
- Add/Remove current_page_parent class
- Find out if a page has no parent
- Schedule Page to Menu [duplicate]
- Can’t include Language switch in Nav Menu
- Add within the output of
- Primary navigation menu & footer not showing in category / tag page
- Blank Pages with # URL & Google
- How to dynamically populate a dropdown
- Is this format possible with a custom Nav Walker class?
- Tell the difference between a term and page when they have the same ID
- Changing page URL and connect newsletter to MailChip
- How to make previous_post_link into an image [duplicate]
- Implementing the twentythirteen responsive menu in twentytwelve
- Removing Parent Page URL While Keeping the Navigation Intact
- Custom Post Types in the WordPress Navigation Menu
- How Do I Add Images To Main Navigation Menu
- Hide menu from homepage
- Apply class to every third list item? [duplicate]
- Disable parent in wp_list_pages – WordPress
- How to automatically redirect to first item of second navigation level in a multi-level menu?
- Locking in navigation labels before changing title?
- How to Add support for sub-menu item description in wordpress?
- I can’t add more pages to menu – menu delete pages
- How to get current page nearest parent id?
- add_menu_page does not render the expected result
- Additional navigation bar in header
- Why is my navigation in my onepage not working?
- Navigation item – current date in url
- Hide a menu (navigation bar) on all posts
- Programatically Created Menu not Editable in Dashboard
- Bootstrap Theme Migrated to WordPress
- How to add all subcategories as submenu in WordPress menu
- How can I show a custom WordPress menu anywhere I want on my website?
- Bootstrap Nav Walker Sub Menu Image
- Creating navigation out of specific IDs and their children?
- WordPress Menu item > Sub menu Class update
- Add active class to wp_nav_menu
- wordpress page navigation numeric pagination showing same posts on each navigation
- how to configure this type of menu
- Header lists posts instead of showing primary nav menu
- Problem with sub-menu container
- Show Child of Parent Page including all other parents
- How to build a navigation menu for long-form texts like this one
- HTML-to-WordPress: Dropdown Navigation Menu [closed]
- Show only second level menu items? [duplicate]
- Add item ONLY to the primairy navigation
- Image menu on responsive WordPress
- How to retain responsive navigation menu in twentyeleven child theme
- Redirect url in plugin to somewhere else?
- individual images as navigation design TwentyTen
- WordPress Navigation default output
- Adding Pages to Menus – No Page Hierarchy in Backend [duplicate]
- add additional anchors in navigation menu
- Navigation won’t update to show full path to single post
- Custom navigation / menu output (walker?)
- How does WP knows which template to use for a page
- Problems with draft website pages
- WordPress “add to menu” button not working