0
我有我的主页(wp nivo滑块)的滑块脚本,但只希望显示幻灯片(帖子),如果今天的日期是post_end_date(自定义字段)之前。这样我就不必手动删除不再相关的帖子。WordPress的:根据自定义字段显示帖子
这是加载帖子的代码。任何帮助将不胜感激。
自定义后场:post_end_date
<?php
$category = get_option('wpns_category');
$n_slices = get_option('wpns_slices');
?>
<?php query_posts('cat='.$category.'&posts_per_page=$n_slices'); if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php if ('' != get_the_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail(); ?>
</a>
<?php endif ?>
<?php endwhile; endif;?>
<?php wp_reset_query();?>