I'm modifying a theme with a "featured" panel that shows a specified number of (n) posts. By default, it shows the (n) most recent. I have the options set so that n=4. I'd like to modify the wp_query statement so that it returns the two most recent plus the two next future posts, i.e. the present moment +/- 2 posts. I guess that it might be necessary to have two loops, one future and one recent, but I'm wondering if it's possible to construct a combined statement that does the trick.
Here's the original query statement, followed by my modified version that returns only FUTURE posts.
ORIGINAL
<?php $recent = new WP_Query("cat=".$feature_cat_1."&showposts=".$feature_cat_1_num); while($recent->have_posts()) : $recent->the_post();?>
<?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<?php endif; ?>
<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_time('l, F j, Y'); ?> - <?php the_title(); ?></a></b>
<?php the_content(__('[Read more]'));?>
MODIFIED FOR FUTURE
<?php $recent = new WP_Query('category_name=contras&post_status=future&order=ASC'); while($recent->have_posts()) : $recent->the_post();?>
<?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<?php endif; ?>
<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_time('l, F j, Y'); ?> - <?php the_title(); ?></a></b>
<?php the_content(__('[Read more]'));?>