Wordpress只显示即将到来的项目



我有一个Wordpress脚本,显示议程项目。我只需要显示即将到来的项目。但是在我的代码中,它显示了所有的项目,包括过去的项目。

谁能告诉我,如何只显示即将到来的项目?

<?php
                              query_posts('post_type=agenda&&showposts=-1');
                              if (have_posts()) : while (have_posts()) : the_post(); ?>
                              <div class="post_page">
                              <h3 class="date"><?php if(get_field('date')) { echo date_i18n("l d F Y",strtotime(get_field('date'))); } else { the_time('l d F Y'); } ?></h3>
                                <h3><?php the_title(); ?></h3>
                                <?php the_excerpt(); ?>
                                <div class="clear"></div>
                                <a href="<?php the_permalink(); ?>">Lees meer...</a>
                                </div>
                     <?php endwhile; endif; ?>

from docs似乎你可以添加一个条款到query_posts()

相关内容

最新更新