Opened 15 years ago
Closed 14 years ago
#12660 closed defect (bug) (worksforme)
WP_Query is broken when using meta_* args
Reported by: | ptahdunbar | Owned by: | ryan |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | normal | Version: | 3.0 |
Component: | Query | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
There seems to be multiple problems with WP_Query using the meta_* args:
- Using just meta_key does not return all posts based on the meta_key value.
- Using just meta_value returns duplicate posts based on the meta_value.
- Using both, meta_key and meta_value does not return any posts even if posts exists based on those values.
I tested the last changeset of query.php (r13501) which doesn't seem to be the cause.
Change History (4)
#3
@
15 years ago
Can't duplicate using any variations of meta_* with this in twentyten index.php as of 04/01/10 nightly
$args=array( 'meta_key'=>'cf1', 'meta_value'=> 'yes', 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args);
Note: See
TracTickets for help on using
tickets.
I cant duplicate with my small testset.
Can you post any code chunks you're using, and/or what you expect the output to be?