I’m not sure why you use the sort_column
parameter, it’s not supported by the WP_Query()
class. According to the Codex, the correct way to sort, is to use the order
and orderby
parameters.
Please try this:
$args = array(
'post_type' => 'page',
'orderby' => 'menu_order',
'order' => 'ASC', // DESC is the default order
'post_status' => 'publish',
'posts_per_page' => -1,
'post_parent' => $post->ID,
);
$query = new WP_Query( $args );
Related Posts:
- How does wordpress calculate the page depth?
- Check whether the child page has siblings
- How to echo excerpts with wp_list_pages?
- Extra title output with this function wp_list_pages
- List child pages by slug not ID?
- Combining ‘depth’ with ‘include’ in wp_list_pages()
- Get the ID of the direct parent page
- Get parent of current page
- Exclude pages by menu order
- Change page name in admin list
- Check if the child page has sibling pages, and bookmark current page
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- Check if page has subpages
- How should I set up a Tumblr blog at a WordPress Page?
- Translate dashboard metabox
- Include parent page in list of child pages
- wp_list_pages get the hole hierarchy for current page
- Remove and change pages label
- Get All Pages as strings in array
- How To List Sibling Pages And Include The Featured Image?
- How to make in post Parent page children page list nummbered
- Custom wp_list_pages() function
- How to set post slug when using wp_insert_post();?
- Create a page without adding a page in the Database
- What methods to use to create small, editable pieces of text for static pages?
- Hide page visual editor if certain template is selected?
- What is an alternative to get_page_by_title()?
- Add a new page to wordpress programmatically
- Get Permalink for the top level parent of child pages
- Get page id by title?
- How to embed page content in a blog post
- Notify admin when page is edited?
- List all pages and children in separate ul
- Dynamically Load Styles and Scripts from Theme Functions.php
- How do I load custom scripts and styles for a page?
- How should I best incorporate WordPress in my static website?
- Can’t change parent page
- Call the content of a page in AJAX in WordPress
- Registering multiple sidebars with data from an array
- How to dynamically save a selected option from page “Templates” selectbox?
- Change names of pages in wordpress
- WASM page in WordPress website
- wp_list_pages sort order is different for different languages [closed]
- Include a specific page in your template
- Where is the key _wp_page_template passed?
- Displaying page content in category archive (archive.php)
- Is it possible to skip certain specified pages when using < prev and next > links?
- Custom Page Order instead of Alphabetical
- Missing Page, But Still Exists In Preview
- How to create a page that lists all the experts(Users with same access permission as author)?
- Trying to Edit a Page but it sends me to a Product Edit page
- Create a page that’s to not be indexed or accessible via slug
- My custom template page not loading content inside it?
- Can a user find a child page?
- How to edit a HTML list in WordPress?
- Is it possible to activate page template without manually selecting it in wp-admin?
- Excerpt Now Showing on the Post Page
- How can I use “getarchives_where” to get monthly archives for static pages?
- All Pages visible on the Frontpage
- How do we exclude multiple pages (like opposite of is_page)
- How to remove only pages from Admin Bar?
- Query specific Pages
- Phantom page can’t get rid of/can’t get at to change
- ‘x’ Converted to html code in example: 5×10
- Published pages missing
- How can I send an email when someone uses the HTML download Attribute?
- multiple post into single page
- Later blog post pages give 404 error
- Different css file not working for the page template I created
- How to change the order of the Front Page so it doesn’t appear first
- 404.php only works if I’m logged in. Everybody else redirects to wp-login.php – why?
- Using index.php as page template
- What’s the section of code (or loop) which retrieves the Page title and description?
- How to backup just pages from my site, but not posts with other post_type values
- Template field missing in page attributes
- How to hide a page in wordpress made for menu
- How to delete the scrollbar in my pages?
- How to make a page as default page for a theme without a plugin?
- How to change default home link title?
- Recovering a page from the drafts
- Pulling images from the media folder category to display inside a page
- My Password Protected Pages Aren’t Working
- Display grandchild page content on parent page
- Converting HTML to WordPress theme: integrating pages function and using its text editor, conditional enqueuing
- How do you assign custom template for Posts page (under Front page displays setting)
- Category Page Custom Layout [closed]
- How to copy specific page content and create child page?
- How to output different content of page on different places in my template
- WordPress slow pages/post, hangs and white text
- 1st Level Page with No Children
- Previewing Draft shows white page, publishing works fine?
- Changing title bar in browser window of theme “Encounters Lite”
- Custom Filter using meta_value in wordpress admin list not working
- making a pseudo-static page
- Dynamic content in pages
- Woocommerce – Making product pages child of shop
- Javascript will not run properly
- Website fully loads then immediately crashes in Internet Explorer [closed]
- How to display a page?
- How to read a page’s “Shortcodes” from the Template File?