pages match book order

This commit is contained in:
Prospect
2024-02-21 20:14:55 -05:00
parent 04313d7198
commit 3123504f15
9 changed files with 962 additions and 84 deletions

View File

@@ -42,7 +42,15 @@ function ddd($variable)
// Get An Array of Top Level Pages and their Subpages
function get_pages_as_array()
{
$pages = get_pages();
$args = [
'sort_order' => 'ASC',
'sort_column' => 'menu_order',
'hierarchical' => 1,
'exclude' => []
];
$pages = get_pages($args);
$page_hierarchy = array();
foreach ($pages as $page) {