Please help with my function
-
I’ve got a function which have to return meta keys
function deco_get_metakeys() { $args = array( 'post_type' => 'post', 'posts_per_page' => - 1, 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'deco_post_is_slide', 'value' => 1, ), array( 'key' => 'deco_post_choose_redaction', 'value' => 1, ), array( 'key' => 'deco_post_interview', 'value' => 1, ) ) ); $query = new WP_Query( $args ); while ( $query->have_posts() ) { $query->the_post(); $exclude_post[] = $query->post->ID; } return $exclude_post; }It returns empty array, can somebody explain where did i go wrong?
The blog I need help with is: (visible only to logged in users)
- The topic ‘Please help with my function’ is closed to new replies.