I'm trying to order a custom-post-type WP_Query by a custom vafpress metabox:
$args_voyages = array(
'post_type' => 'voyage',
'order' => 'ASC',
'orderby' => 'meta_value_num',
'meta_key' => vp_metabox('meta_voyage_features.meta_voyage_features_price'),
'rewrite' => false,
'meta_query' => array(
array(
'key' => '_thumbnail_id',
'compare' => 'EXISTS'
),
),
'tax_query' => array(
'relation' => 'AND',
$array_current_destination,
$array_current_zone,
),
);
$voyages = new WP_Query($args_voyages);
The WP_Query is not returning any result. I tried this options too, with no results:
'meta_key' => 'meta_voyage_features.meta_voyage_features_price'
and
'meta_key' => 'meta_voyage_features_price'
Can anyone help me?
Thankyou very much!
Aucun commentaire:
Enregistrer un commentaire