You don’t set sort_column
to menu_order
when you call get_pages
, so it defaults to sorting on post_title
.
$pages = get_pages( array( 'sort_column' => 'menu_order' ) );
Related Posts:
- Create custom page and add it in nav menu by code
- I can’t add more pages to menu – menu delete pages
- How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- wp_nav_menu remove class and id from li
- Add separator to admin submenu
- On which hook should I be calling register_nav_menu(s)?
- Add child pages automatically to nav menu
- Automatically remove trashed pages from nav menu
- Directing a page to a default subpage
- Menu is not visible in appearance
- One site, 2 distinct sections: two different top nav menus?
- Can you have different menus and theme on a per-page basis?
- List children of second level sub page
- Make Theme automatically choose default nav menu
- How to make pages metabox display all hierarchy in menu admin?
- How can I disable parent menu item links?
- How to get current page menu item name instead of full menu item list
- Organizing by super-categories (or nested categories)?
- Nav menu items disappearing (but not immediately)
- Hide pages depending on role
- Get parent page/menu id of current post
- wp_nav_menu custom walker – child items
- Change menu items URL
- wp_nav_menu doesn’t generate parent/ancestor classes
- Making WordPress’ page and menus visible only for logged in users, checking session variables
- Add static item to wp_nav_menu
- Different side menu on each page
- How to get wordpress nav menu outside of wordpress system?
- How to scroll item in the Menu setting effectively?
- WordPress – site with 2 stylesheets and more…
- Add nav menu CSS class to body
- Remove Page Name From WordPress Menu
- Hiding Menu From Specific Pages
- Change HTML structure for custom menu in sidebar
- Getting post content within wp_nav_walker
- wp_list_pages sort order is different for different languages [closed]
- Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?
- list pages only from master parent
- Custom Admin Menu Order
- Current menu item
- wp_list_pages: only show subpages on the parent page?
- remove everything from wp_nav_menu
- How to add wechat (weixin) link to navigation menu?
- Auto add pages to primary menu with functions.php
- Admin only menu/page
- Does loading of sub pages in menu cause load to the server?
- Best way to customise wp_nav_menu [duplicate]
- WordPress menu permalink redirects to wrong page
- Link to Homepage in Menu
- Schedule Page to Menu [duplicate]
- How to add custom classes to more than one separate menu’s a link in wordpress?
- Add class active to static menu
- How do I separate link levels in a custom menu walker?
- SlideDeck 2, make back-end visible for admins only
- wp_list_pages() but only show children on the branch you are on
- Check if Page Already Exists in Menu
- Programmatically add existing pages and subpages to Appearance Menu
- How to retrieve parent menu item name of current submenu item
- two different separate sections on the same site
- When clicking on menu item not going to specific page
- Ad custom admin page like WordPress customizer [closed]
- Menu items suddenly are displayed all over the page [closed]
- Displaying different page links on different pages
- pull non-wp site into content area of wordpress -or- pull wp header into non wp site?
- Help with walker for nav
- Using my WordPress menu on another platform
- Remove a menu sub-item
- Does is_child() exist in wp 3.5.1?
- How to add html attributes to the “ul” html tag with “wp_nav_menu” function?
- Using _s theme, menu changes do not affect header menu
- wp_list_pages sort order by custom nav menu order
- Limit User Iinterface for Admin?
- How to highlight 1st level menu item based on actual page
- How can I switch pages?
- Make pages visible to only logged in members
- Prevent menu from loading in a page template [duplicate]
- disable Tab post on nav-menus page (Admin)
- Get custom classes in WordPress Navigation Menu
- How to create a menu item which is not a page
- How can I make a menu link visible only to admins (without plugins)?
- How to add a page to header that is outside of WordPress?
- Replace the slug of parent pages with # [closed]
- How to Structure Pages and Subpages
- Highlighting top level link when viewing one of it’s sub-pages, which are not linked in the menu
- Three menus – parent / child / sibling
- rearrange the posts by published date in Menu posts selection
- Insert menu with a custom walker into page / post body using shortcode?
- Add (grand)child pages automatically to nav menu
- how avoid the link of the current post in the menu in the sidebar?
- Orderby menu_order not working; menu is sorted on publish date
- Disable parent in wp_list_pages – WordPress
- Page appears after de registering from menu
- Get parents child pages
- How to undo the last changes to a custom menu?
- Dynamic menu wp_list_pages displaying only current branch including: current page, his siblings and its childs
- wp_nav_menu without menu or theme_location specified
- Filter to hook into menu items and add a custom attribute
- wp_list_pages Hierarchical Help