From 30dbb4e791862cd84243bdde8606edabca7433ff Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 13 Nov 2014 16:16:17 -0500 Subject: [PATCH] make recursive and fix the menu so only getting one level at a time --- functions.php | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/functions.php b/functions.php index 3e0a7c7..5d68994 100755 --- a/functions.php +++ b/functions.php @@ -4,39 +4,35 @@ * * Grab the top level pages and their sub pages as the main navigation */ -function glm_page_menu() +function glm_page_menu($parent = 0, $class = '') { $frontPageId = get_option('page_on_front'); $parents = array(); $pages = get_pages(array( - 'post_type' => 'page', - 'parent' => -1, - 'number' => '', - 'exclude' => $frontPageId + 'post_type' => 'page', + 'parent' => $parent, + 'number' => '', + 'exclude' => $frontPageId, + 'post_status' => 'publish', + 'sort_order' => 'asc', + 'sort_column' => 'menu_order' )); - echo ''; + echo ''."\n"; } + + /** * glm_offcanvas_menu * -- 2.17.1