New answers tagged


The equivalent SQL would be something like SELECT * FROM players ORDER BY teamName IS NOT NULL DESC, postDate DESC; but I'm not sure how that would translate in a simple element query. It'd be something like: {% set players = craft.entries.section('players').orderBy('teamName IS NOT NULL DESC, postDate desc').all() %}

Top 50 recent answers are included