If you look at get_pages()
in the Code Reference you’ll notice two parameters: sort_order
and sort_column
.
So, the following example will give you child pages list sorted by menu_order
:
$pages = get_pages( array(
'child_of' => $post->ID,
'post_type' => 'page',
'post_status' => 'publish',
'sort_column' => 'menu_order',
'sort_order' => 'desc',
) );
You can change menu order manually
or using a plugin, e. g. Simple Page Ordering.
Related Posts:
- how to properly list child pages in sidebar?
- Get custom field value from Grandparent Page for Parent and Child Pages
- Given the page id, check if it has children
- How to get a list of all recently published child pages?
- WordPress get the child pages of current page
- Show siblings (if any) and parents
- List child pages of current page but limit to specific year
- Child page excerpt
- Create WordPress child page from page actions
- How to show child page without providing ID so it’s dynamic
- is_child() function
- Drop-Down Menu of Current Child Pages
- Get WordPress Child Page IDs
- Displaying the first child page of the parent page
- Adding title and description to subpage’s featured image
- Show list of Child Post in Parent Post
- List subpages in order
- parent page grabbing wrong url for child pages – get_page_uri($pageChild)
- i want to get the parent id, only on parent -> child -> child page
- Get first level children of a page ID
- Only one parent page showing
- Create a list of pages excluding children of selected page
- WordPress Betheme: Unkown subheader image of a child page
- Structure for calling child pages
- Child pages and sub-pages do not appear. Why?
- Add link to parent page in list of child pages
- Display child pages full template including the content
- List child pages, exclude the current page
- Listing Child Pages in Random order
- How to display child pages with in a limited child content?
- Display Tags of Child Pages
- Get post_meta of children and compare to current page ID
- Display the latest content from subpages of another page
- Limit the number of child page displaying
- Show the grandmother/father of the childpage
- How to Hard Set the Parent Page in Template
- Get parent page url to show up when it is in child pages
- Check if is on child-page of a particular page
- Remove WordPress theme from a specific page
- How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only
- Advanced Custom Fields – Get custom fields from parent page
- Child Pages Loop
- Get Permalink for the top level parent of child pages
- Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]
- Display child pages on a parent and child page using Featured Thumbnails
- Can’t change parent page
- Javascript that will execute on only child pages of a specific parent
- What is the optimal way to filter out subpages from admin?
- Share parent path between Custom Post Types and Pages?
- Custom Field returning Numerical Value for Image rather than URL
- How to get all child pages in their parent page?
- remove/hide pages from users backend
- How do I list the child of a child page [duplicate]
- List children on child post
- child of post type (custom)
- Menu with parents, children and or siblings pages display
- Append a code when at the current page in wp_list_pages()
- How to retrieve parent menu item name of current submenu item
- Combining ‘depth’ with ‘include’ in wp_list_pages()
- Removed custom post type slug but not working for child pages
- Query Pages and post excerpts dynamically
- Can a user find a child page?
- How to highlight 1st level menu item based on actual page
- Get Child Page IDs by Parent ID
- List of child custom post types lists all custom post types
- Redirect to first child on Custom Post Type (without template)
- How to display childrens custom fields?
- How to Display Shortcode in the correct location, currently displaying before content after Page Title?
- WP_Query returns different results from get_posts() [closed]
- WordPress child pages not working
- Display child page content of a specific parent on home page
- When listing child pages run out of memory
- Is there a way to dump all registered sidebar/widget?
- Get list of all Grandchild Pages
- Check if page has subpages
- Migrate Custom Post Type with Custom Fields data and parent child order
- Return true if parent page id matches
- Hide BBPress create topic on one page
- How do I list subpages in post editor view?
- I have a problem with displaying children pages of custom post type
- Display list of pages that contain a certain string within the slug
- Get a page ancestor from a most viewed list
- Display grandchild page content on parent page
- PHP: Why does my code work in index.php but not a widget?
- How to show children pages as array
- WordPress custom post type and page
- How to show the view more on my display of pages shortcode
- Menu order of parent menu from perspective of child menu
- How to copy specific page content and create child page?
- Why is wp_list_pages altering $post->ID of the page?
- Display Child Page with custom fields within Parent Page
- Display thumbnail of child, parent and ancestor using featured thumbnails
- How to accomplish a child page navigation?
- Get current post’s child page?
- Woocommerce – Making product pages child of shop
- WordPress Template works until page becomes a child
- How to get child pages and add unique class only to active page?
- Subpages menu on sidebar plus widgets
- highlight parent page on menu when child page is on sidebar (and not on menu)
- How can I structure my pseudo footer nav code with wordpress codex code?