[wp-trac] [WordPress Trac] #28589: Warning on Usage of WP_Query() with Orderby Array
WordPress Trac
noreply at wordpress.org
Sat Jun 21 08:08:53 UTC 2014
#28589: Warning on Usage of WP_Query() with Orderby Array
--------------------------+------------------------------
Reporter: behrang | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.9.1
Severity: normal | Resolution: invalid
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by engelen):
* keywords: => close
* status: new => closed
* resolution: => invalid
Comment:
This is not a bug. `orderby` doesn't accept anything other than a string,
so what you're trying to pass (an array) is actually not support by
`WP_Query`. You should alter your `orderby`-parameter (by using `orderby
=> 'meta_value_num'`, combined with the proper `meta_key` query parameter,
for example).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28589#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list