Timeline for WordPress meta_query not working
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 30, 2015 at 10:23 | vote | accept | Dan Taylor | ||
Mar 26, 2015 at 17:21 | answer | added | Dan Taylor | timeline score: 0 | |
Mar 26, 2015 at 17:20 | comment | added | Dan Taylor | @SeventhSteel Weirdly if I change the post type to post the query is passed. Obviously it doesn't work but it shows in the query. | |
Mar 26, 2015 at 16:55 | comment | added | Dan Taylor | @SeventhSteel yea it's stripping it out. Like I said in the OP it strips it out no matter what I put in there. For completenesses sake I tried it without the one with the hyphen. Still no joy. | |
Mar 26, 2015 at 16:24 | comment | added | SeventhSteel |
Looks like it's stripping out the entire meta query for some reason. It might be choking on the hyphen in wp_comp_entry_competition-id ? Try it without that part.
|
|
Mar 26, 2015 at 15:17 | comment | added | Dan Taylor |
@cybmeta yes there are entries with the meta details. The query returns all posts as there is no other filter. If I use the single filter i.e. use meta_key = etc then it works but I need to filter on two meta keys.
|
|
Mar 26, 2015 at 15:15 | comment | added | Dan Taylor |
@SeventhSteel [request] => SELECT sosen_posts.* FROM sosen_posts WHERE 1=1 AND sosen_posts.post_type = 'wp_comp_entries' AND (sosen_posts.post_status = 'publish' OR sosen_posts.post_status = 'future' OR sosen_posts.post_status = 'draft' OR sosen_posts.post_status = 'pending' OR sosen_posts.post_status = 'private') ORDER BY sosen_posts.post_date DESC
|
|
Mar 26, 2015 at 12:23 | comment | added | SeventhSteel |
In the print_r output of $lookup the WP_Query object, look for the request property and post it here. That's the MySQL statement itself, it should tell us more.
|
|
Mar 26, 2015 at 11:50 | comment | added | cybmeta | I don't see anythin wrong. Can you check that the entry with that meta keys and meta values exists? | |
Mar 26, 2015 at 11:48 | history | edited | cybmeta | CC BY-SA 3.0 |
remove personal emails
|
Mar 26, 2015 at 9:52 | review | First posts | |||
Mar 26, 2015 at 11:21 | |||||
Mar 26, 2015 at 9:49 | history | asked | Dan Taylor | CC BY-SA 3.0 |