Wordpress复杂的meta_query

时间:2015-10-16 06:26:46

标签: mysql wordpress wp-query

featured-home_duration = 2

featured-home_start_date = 2015-10-16 00:00:00

这两个是meta_keys,我的post_meta table保存了值。

我需要找帖子。它们将基于以下公式。

DATE_ADD({meta_value of featured-home_start_date} , INTERVAL {meta_value of featured-home_duration} DAY) > CURDATE()

   $args = array(
    'post_type' => VA_LISTING_PTYPE,
    'posts_per_page' => 10,
    'orderby' => 'title menu_order',
    'order' => 'ASC',
    'meta_query' => array(
        array(
            'key' => ? ? ? ,
            'value' => ? ? ? ,
            'compare' => '='
        ),
    )
);
$listings = new WP_Query($args);

任何人都可以帮助我吗?

0 个答案:

没有答案