- uery_posts(
- array(
- 'showposts' => 500,
- 'post_type' => 'holidays',
- 'post_status' => 'publish',
- 'order' => 'desc',
- 'orderby' => 'meta_value',
- 'meta_query' => array
- (
- array
- (
- 'key' => 'from_date',
- 'value' => array( '01-01-2012', '31-12-2014' ),
- 'type' => 'DATE', // TRIED: DATE, SIGNED, NUMBER
- 'compare' => 'BETWEEN'
- )
- ),
-
- ));
复制代码
|