'wmw_article', 'numberposts' => -1, 'post_status' => 'publish', 'meta_key' => '_wmw_wiki_id', 'meta_value' => $wiki_id, 'orderby' => [ 'meta_value_num' => 'ASC', 'title' => 'ASC' ], ] ); } $prev_art = null; $next_art = null; foreach ( $siblings as $i => $s ) { if ( $s->ID === $post_id ) { if ( $i > 0 ) $prev_art = $siblings[ $i - 1 ]; if ( $i < count( $siblings ) - 1 ) $next_art = $siblings[ $i + 1 ]; break; } } ?>