[wp-trac] [WordPress Trac] #39037: Should REST API support multiple orderby values?

WordPress Trac noreply at wordpress.org
Thu Mar 27 15:15:07 UTC 2025


#39037: Should REST API support multiple orderby values?
--------------------------------------+------------------------------
 Reporter:  ChopinBach                |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  REST API                  |     Version:  4.6.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by pbiron):

 Replying to [comment:12 Mamaduka]:
 > > I suspect that once the REST API supports multi-level orderby, various
 things in GB will need to then be modified to support the feature.
 >
 > @pbiron, GB just sends and receives REST API requests as they are. I
 don't think it will need any modifications.

 Sorry, I should have been more clear in my comment.

 As a simple example, consider the Latest Posts (or Query Loop) block.
 There is currently an `orderBy` param.  Corresponding to that param, there
 is a select/dropdown in block properties UI.

 If/when the REST API supports multi-level `orderBy`, the GB UI (for
 specific blocks) will need a way for content editors to specify a multi-
 level `orderBy`.

 Unfortunately, I don't currently have any bright ideas about what those UI
 changes could/should be :-)  and would be perfectly happy (at least on 1st
 release) with having to go into Code Editor mode to specify a multi-level
 `orderBy`.

 Does that make sense?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39037#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list