【发布时间】:2013-12-18 06:18:30
【问题描述】:
我正在使用此查询来显示我的帖子:
$today = getdate();
$year=$today["year"];
$month=$today["mon"];
$day=$today["mday"];
query_posts( $query_string.'order=ASC' . '&post.status=future,publish'.'&year='.$year.'&monthnum='.$month );
?>
现在我想添加一个过滤器,只显示今天发布或将来发布的帖子。
示例:今天是 3 月 22 日。 PostA 于 3 月 1 日发布,PostB 今天发布,PostC 将在 3 月 24 日发布(状态“未来”已在我的查询中,因此仍将显示)。 我的新查询过滤器应该只显示 PostB 和 PostC。
提前非常感谢!
:-)
【问题讨论】:
标签: wordpress date filter publish