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
- Add child pages automatically to 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?
- Organizing by super-categories (or nested categories)?
- Get parent page/menu id of current post
- wp_nav_menu custom walker – child items
- 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
- Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?
- remove everything from wp_nav_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]
- Schedule Page to Menu [duplicate]
- Add class active to static menu
- How do I separate link levels in a custom menu walker?
- 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
- 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
- Help with walker for nav
- Using my WordPress menu on another platform
- Remove a menu sub-item
- How to add html attributes to the “ul” html tag with “wp_nav_menu” function?
- wp_list_pages sort order by custom nav menu order
- Limit User Iinterface for Admin?
- How can I switch pages?
- Make pages visible to only logged in members
- Prevent menu from loading in a page template [duplicate]
- Get custom classes in WordPress Navigation Menu
- Replace the slug of parent pages with # [closed]
- How to Structure Pages and Subpages
- Three menus – parent / child / sibling
- rearrange the posts by published date in Menu posts selection
- 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
- 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
- Responsive menu on genesis theme [closed]
- Parent Page > Child Page Menu
- add_menu_page does not render the expected result
- How to open a lightbox form from a navigation menu item
- Main menu navigation links and new pages
- Page header menu links change
- Hide custom menu when when no menu selected
- How to show pages in menu without link
- Add a menu metabox to post edit page
- Setting or plugin for showing submenus horizontally under the main menu, and keep them after selection
- Add prefix to url, but products not showing in page SHOP
- adding pages in underscores.me theme
- How to get the Page Name of the current page?
- How can I order these pages in this navigation bar on this old wordpress theme?
- Product categories are mixed when creating menu
- Unable to remove page from primary menu
- how to create pages and link them to a menu
- Any simple way to show 10 previous pages by id to current page in links as a menu
- How to add class and span to
- WordPress – Apperance > Menu
- wp_nav_menu in 3.7 add name class nav navbar-nav
- How to make a page to not appear in the menu when created?
- custom walker to add iconfont to wp_nav_menu
- How to create an user defined page?
- Adding Pages to Menus – No Page Hierarchy in Backend [duplicate]
- How can I make this process automatic?
- how can i get the page_ID in nav li [closed]
- How does WP knows which template to use for a page
- Problems with draft website pages
- Add a page to a subscribers account
- After WordPress 4.8 upgrade, wp_nav_menu() string search / replace not working