From 4fed7f5304540ecc6d1df34238925ca58119aeba Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 20 Dec 2017 14:23:38 -0500 Subject: [PATCH] sorting things get the sort correct for menu items. --- functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index cbb83c3..d9892c7 100644 --- a/functions.php +++ b/functions.php @@ -106,10 +106,11 @@ function glm_get_visable_page_ids() array( 'post_type' => 'page', 'post_status' => 'publish', - 'sort_order' => 'asc', + 'sort_order' => 'asc', + 'sort_column' => 'menu_order' ) ); - if ( $publishedPages ) { + if ( $publishedPages ) { foreach ( $publishedPages as $page ) { if ( !$page->post_password ) { $publishPageIds[] = $page->ID; @@ -118,7 +119,7 @@ function glm_get_visable_page_ids() } return implode( ',', $publishPageIds ); } else { - return ''; + return ''; } } -- 2.17.1