I'm just curious if it is possible to use the ORDER BY FIELD() clause using the $query
via pre_get_posts
, or if I need to use a Custom Query for that.
Here is the code I've tested but it didn't work:
$query->set( 'orderby', 'FIELD(ID,5,3,4,1)' );
Thanks in advance!