sorting things
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 20 Dec 2017 19:23:38 +0000 (14:23 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 20 Dec 2017 19:23:38 +0000 (14:23 -0500)
get the sort correct for menu items.

functions.php

index cbb83c3..d9892c7 100644 (file)
@@ -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 '';
     }
 }