Timeline for ORDER BY custom field value out of where clause
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Mar 29, 2022 at 14:57 | history | suggested | luke | CC BY-SA 4.0 |
added a missing single quote in code
|
Mar 29, 2022 at 13:13 | review | Suggested edits | |||
S Mar 29, 2022 at 14:57 | |||||
Feb 24, 2016 at 13:18 | comment | added | dkatwp | Thanks @fischi - but I have two problems with that solution: 1) the value of 'state_clause' in meta_query array gets overwritten - so only last declaration stays ('timezone') if u actually dump the query. 2) the 'relation' => 'OR' ruins the logic of a query - now result is all posts in DB as population exists in all cases | |
Feb 24, 2016 at 13:04 | comment | added | fischi | see updated answer | |
Feb 24, 2016 at 13:03 | history | edited | fischi | CC BY-SA 3.0 |
added second example
|
Feb 24, 2016 at 12:01 | comment | added | dkatwp |
Thanks @fischi - could I kindly ask u for a tip on yet another modification to this query: what if I need to get all posts WHERE state is 'Wisconsin' OR timezone is 'central' ORDER BY population DESC
|
|
Feb 24, 2016 at 11:58 | vote | accept | dkatwp | ||
Feb 24, 2016 at 11:49 | history | answered | fischi | CC BY-SA 3.0 |