在将来发布发布日期的wordpress显示帖子

问题描述:

需要wordpress问题帮助。在将来发布发布日期的wordpress显示帖子

我需要编辑query.php以仅获取今日或今后发布的帖子。 林通过改变未来越来越细后:

$where .= " AND ($wpdb->posts.post_status = 'publish'"; 

$where .= " AND ($wpdb->posts.post_status = 'publish' OR"; 
     $where .= " $wpdb->posts.post_status = 'future'"; 

但是我仍然得到旧文章

任何想法?

感谢

编辑: 我

iv got in $where .= " AND $wpdb->posts.post_date >= '" . date('Y-m-d') . "' "; 

但它不视为影响的结果。我已经回复了$在哪里和日期显示为2011年11月22日,有谁知道这是否是正确的格式?

我对wordpress并不是很熟悉,但发布会返回所有具有该状态的内容,因此包括过去发布的帖子。

你应该能够做到像

$where .= " AND $wpdb->posts.post_status = 'publish'"; 
$where .= " AND $wpdb->posts.post_date >= NOW()";