我正在尝试编写一个WP_Query
,我只打给2012年3月之后发布的帖子。我可以成功地调用刚刚在2012年3月发布的帖子,但努力工作'从2012年3月起'。在Wordpress中某个日期后发布的查询帖子
$current_year = date('2012');
$current_month = date('>3'); // This doesn't work
$current_month = date('3'); // This DOES work
$custom_query = new WP_Query("year=$current_year&monthnum=$current_month&order=ASC&posts_per_page=-1");
我是否缺少一些简单的东西,还是这样会变得更加复杂?
好极了,这完美地工作 - 谢谢! – SparrwHawk