From: Steve Sutton Date: Wed, 20 Dec 2017 19:23:38 +0000 (-0500) Subject: sorting things X-Git-Tag: v1.0.6^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=4fed7f5304540ecc6d1df34238925ca58119aeba;p=WP-Themes%2FAdelaineConstruction.git sorting things get the sort correct for menu items. --- 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 ''; } }