Can't get WP_Query to work properly
-
What I want it to do:
Retrieve all posts with a “osiris_slider-main” value.What its doing:
I am receiving the first sticky post, which doesn’t even contain that value.index.php
$slider = new WP_Query( array( 'post_type' => 'any', 'meta_query' => array( array( 'key' => 'osiris_slider-main', 'value' => '', 'compare' => 'NOT LIKE' ) ), 'orderby' => 'date' ) ); print_r($slider);
Any help would be greatly appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Can't get WP_Query to work properly’ is closed to new replies.