All Topics
Filtering postname/slug with “is” value
I’m trying to create a smart filter on the slug field where it filters by a specific value but it currently only allows contains, starts with and ends with. In one of our custom post types, slugs aren’t unique so it would be good to be able to filter for a specific value. As it stands “contains” will match partial strings so filtering for “2023” will pick up posts with a slug of “2023-pt”. A partial workaround is to define starts with and ends with but that wouldn’t work for people who have posts starting and ending with the same text.
Adding:
Operators::EQ,
to Search\Comparison\Post\PostName.php seems to work – is there a reason this can’t be added?
You must be logged in to reply to this topic.