- This topic has 2 replies, 2 voices, and was last updated 1 year, 1 month ago by .
Recently I encountered an issue trying to create a new Custom Post Type. I created it and published, but it did not show up in the menu as expected. I found the issue was the automatically created slug was longer than 20 characters:
(string) (required) Post type. (max. 20 characters, cannot contain capital letters, underscores or spaces)
I’d recommend limiting the automatic slug creation to 20 characters. Some UI element to count the characters with a warning why it is limited may help future users.
My use case:
CPT name of ‘Business Directory Listing’ converts to ‘business-directory-listing’ (26 characters) Changing it to ‘biz-dir-listing’ fixed the issue. Maybe there’s a good reason why it is limited to 20 characters, but it seems awfully small to me.
- You must be logged in to reply to this topic.