In WordPress, this can be configured in two ways: through a plugin or through code. The most reliable way is to add a small code to functions.php, which will change the order of sorting pages in the admin panel by default.
✔ Option 1: Code in functions.php (recommended)
This fragment sets the sorting by creation date (post_date) in descending order (newer — higher) for the page post type in the admin:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function avalyst_sort_pages_by_date_default( $query ) { if ( !is_admin() ) { return; } $screen = get_current_screen(); if ( isset($screen->post_type) && $screen->post_type === 'page' && $query->is_main_query() ) { if ( !isset($_GET['orderby']) ) { $query->set( 'orderby', 'date' ); } if ( !isset($_GET['order']) ) { $query->set( 'order', 'DESC' ); } } } add_action( 'pre_get_posts', 'avalyst_sort_pages_by_date_default' ); |
After adding the code: open “Pages” → “All pages” – records will be automatically sorted by date, not alphabetically; if you manually change the sorting in the table, WordPress will save it to the session, but the default will still be the date.
✔ Option 2: Plugin
The Admin Columns or Simple Page Ordering plugin allows you to customize the page display order, but does not set the default sorting as stable as the code. Therefore, the first method is optimal.


Leave a Reply