diff --git a/inc/template-functions.php b/inc/template-functions.php index e174c8b1..d1e7bb37 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -111,23 +111,6 @@ function uw_list_pages( $mobile = false ) $ids = ! is_front_page() ? array_map( function($sibling) { return $sibling->ID; }, $siblings ) : array(); - $args1 = array( - 'child_of' => $post->ID, - 'post_type' => 'page', - 'post_status' => 'publish', - 'depth' => 1 - ); - $children_array = get_pages( $args1 ); - $count = 0; - foreach($children_array as $children) { - $hidden = get_post_meta($children->ID, "parent", true); - if ( ($hidden == "on") || ( in_array($children->post_parent, $ids) ) ) { //problem causer! - $ids[] = $children->ID; - } else { - $count++; - } - } - $pages = wp_list_pages(array( 'title_li' => 'Home', 'child_of' => $parent->post_parent, @@ -137,7 +120,7 @@ function uw_list_pages( $mobile = false ) 'walker' => $UW->SidebarMenuWalker )); - return ( $pages && $count!=0 ) ? sprintf( '%s