‘sort_column’ => ‘menu_order’ not working


We have a simple plugin to display a tree menu, which includes the parent page, plus the parent page’s children (so, the siblings of the current page).

We’re using the following get_pages code:

$pages = get_pages( [
   'child_of' => $parent,
   'sort_order' => 'ASC',
   'sort_column' => 'menu_order',

However, the pages are listed in ascending order of date created (oldest first).

How do we make the pages be listed in the page order in the right sidebar of the edit page screen?

Steve 2 months 0 Answers 14 views 0

Leave an answer