orderBy title, but remove the word "The" from titles If I have a huge list of TV shows and Movies, many of them have &quot;The&quot; in the title, meaning they all get grouped together if you order by title.
Is it possible to &quot;filter out&quot; a word in entry titles when using orderBy?
{% set entries = craft.entries().section('media').orderby('title asc').limit(24).all() %}
{% set entries = craft.entries().section('media').orderBy(&quot;(CASE WHEN `title` LIKE 'The %' THEN SUBSTRING(`title`, 5) WHEN `title` LIKE 'A %' THEN SUBSTRING(`title`, 3) ELSE `title` END) asc&quot;).limit(24).all() %}
worked.