diff --git a/src/Controller/Component/FilterComponent.php b/src/Controller/Component/FilterComponent.php
index <HASH>..<HASH> 100644
--- a/src/Controller/Component/FilterComponent.php
+++ b/src/Controller/Component/FilterComponent.php
@@ -656,7 +656,7 @@ class FilterComponent extends Component
                 $sortField['custom'] = [$sortField['custom']];
             }
             foreach ($sortField['custom'] as $sortEntry) {
-                $options['order'][] = $sortEntry;
+                $options['order'][] = preg_replace('/:dir/', $dir, $sortEntry);
             }
         } else {
             $options['order'][] = $sortField['modelField'] . ' ' . $dir;
enable dynamic sort directions for custom sort options by using ":dir"