[wp-trac] [WordPress Trac] #15031: WP_Query can no longer sort by meta value
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 4 19:39:21 UTC 2010
#15031: WP_Query can no longer sort by meta value
---------------------------+------------------------------------------------
Reporter: aaroncampbell | Owner: scribu
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Query | Version: 3.1
Severity: normal | Keywords: dev-feedback
---------------------------+------------------------------------------------
Changes (by aaroncampbell):
* keywords: => dev-feedback
Comment:
Adding the capability to `_wp_meta_sql()` was pretty simple. However,
where it's currently called from any order by options would be appended to
whatever was already calculated, which means that meta data ordering would
always have to be secondary. You could NOT order by 'some_meta_value,
date' only by 'date,some_meta_value' or just 'some_meta_value'. If we
move it to being processed BEFORE the existing order_by is processed, then
the reverse is true.
It seems like the correct solution would actually be to have some kind of
place holder to be allowed, and roll back to appending if no place holders
were used?
Sounds like a pain, so I'd like some input.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15031#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list