[英]Wordpress Query two weeks back
以下查询返回一个星期,但我将如何进行查询,因此返回两个星期:
$columnists=new WP_Query(array('showposts'=>3, 'cat'=>66622, 'orderby'=>'rand','w'=>date('W'),'year'=>date('Y')));
Did you try this 你尝试过这个吗
'w'=>date('W')-1
instead of 代替
'w'=>date('W')
If it doasn't work here is the documentation of WP_Query function http://codex.wordpress.org/Class_Reference/WP_Query 如果不起作用,请参见WP_Query函数的文档http://codex.wordpress.org/Class_Reference/WP_Query
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.