I’m assuming you want to remove numbers as a possibility from all post slugs when the post is created. Doing so for the automatic assignment that happens soon after the title is entered is tricky, but simply stripping out numbers when the post is saved is straight forward enough. Hook the ‘save_post’ action.
You do need to verify the resulting slug is not duplicated anywhere and since numbers are not available, assign additional letters to differentiate otherwise identical slugs:
common-slug
common-slug-a
common-slug-b
common-slug-c etc.
is there any easy way of doing it for the auto assignment?
Alexander, I’m glad you asked!
When I said it was tricky, I was going on memory from the last time this came up. I recall tracing through a bunch of javascript code to find the ajax call and being unable to find corresponding ajax handler in PHP. Since I couldn’t find it, I deemed it “tricky”.
I decided to give it another go. I still had trouble finding the handler, but this time I accidentally stumbled upon some code that was crucial to finding the handler. The rest was easy to trace.
So now knowing the correct filter, this is actually easier than using ‘save_post’. Use the ‘wp_unique_post_slug’ filter to strip out numbers.(Or otherwise modify as desired) Naturally you still need to ensure the modified slug does not occur already.