[wp-trac] [WordPress Trac] #58412: Allowing rand orderby value for post query params
WordPress Trac
noreply at wordpress.org
Fri May 26 14:37:13 UTC 2023
#58412: Allowing rand orderby value for post query params
------------------------------------+--------------------------
Reporter: vrishabhsk | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: REST API | Version: 4.7
Severity: normal | Resolution: wontfix
Keywords: dev-feedback has-patch | Focuses: performance
------------------------------------+--------------------------
Changes (by TimothyBlynJacobs):
* status: new => closed
* focuses: rest-api => performance
* resolution: => wontfix
* version: trunk => 4.7
* milestone: Awaiting Review =>
Comment:
Hi @vrishabhsk,
Thanks for the ticket and welcome to trac!
The REST API intentionally does not support `orderby` of `rand` due to
performance issues and it breaks caching guarantees, see #38693.
The REST API is very extensible, so plugins can easily add support for it
if they'd like to: https://felipeelia.dev/wordpress-rest-api-enable-
random-order-of-posts-list/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58412#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list