Stange meta_query results
-
Hallo!
I thought that one could use meta_query to find fields which have a certain meta_key and meta_value. Hovever, when I put this code somewhere on my webpage:$q = new WP_Query( array( 'meta_query' => array( array( 'key' => 'Frog', 'value' => 'Duck', ) ), )); while ($q->have_posts() ) { $p = $q->next_post(); echo $p->ID . '<br>'; }
this prints “6
139″ although I have no post with meta_key “Frog” neither a post with meta_value “Duck”. Altogether, I have 174 distinct post_id’s in my table wp_postmeta, and I have no idea what is special about post no. 6 and no. 139.Ideas?
Philipp
- The topic ‘Stange meta_query results’ is closed to new replies.