term_id ); $post_ids = array(); foreach ( $menu_items as $items ) { if ( $items->object == 'page' ) { $post_ids[] = $items->object_id; } } $args = array( 'post_type' => 'page', 'post__in' => $post_ids, 'posts_per_page' => count( $post_ids ), 'orderby' => 'post__in' ); } else { $args = array( 'post_type' => 'page' ); } $allPosts = new WP_Query( $args ); // get pages on menu if ( have_posts() ) { // Start the Loop. while ( $allPosts->have_posts() ) { $allPosts->the_post(); // set global $post global $post; $startup_menu_page = get_post_meta( $post->ID, "page_settings", true ); if( isset($startup_menu_page['startup_no_hash'])){ $separator = $startup_menu_page['startup_no_hash']; } //check the separator global $separator; $postId = get_the_ID(); if ( ( $separator != 1 ) && ( $postId != $current_page_id ) ) { ?>