Custom Fields
Support MB Custom Post Type Suggestion: Limit Custom Post Type slug to 20 characters

  • Creator
  • #13415
    Resolved Lisa Tally

    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)
    Default: None

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #13417
    Anh Tran

    Hi Purdue,

    This is a good suggestion. At the moment, there's no restriction yet. I'll add that to the next version.

    Anh Tran

    It's done in the latest version of the plugin. Please update!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.