I used the following query to have only 1 post published on the homepage from a particular category:
<?php if ( have_posts() ) : ?>
<?php query_posts('posts_per_page=1&orderby=date&order=DESC&cat=6'); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?>
<?php endwhile; endif; ?>
Each post has two custom fields containing a begin and an end date. What I need is that after the end date the next post (the one with following begin date) will be shown. But I don’t know how to do it.
Any hint?
Assuming, as per the above comment, the format of the dates is
YYYY/MM/DD
: