Can I alter the main loop to ‘orderby’ a custom callback?
No you can’t pass a callback function. Callback functions are PHP, so they can’t be run in MySQL. For that to work it would need to query the results from the database first, but you’d get the wrong results because they’re unsorted. You would need to use the posts_orderby filter to do this as part … Read more