我正在尝试写一个WP_Query
我只调用 2012 年 3 月之后发布的帖子的地方。我可以成功地调用 2012 年 3 月发布的帖子,但“从 2012 年 3 月起”很难做到。
$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");
我错过了一些简单的东西,还是必须变得更复杂?