Unique ID For Custom Post Type

Support MB Custom Post Type Unique ID For Custom Post TypeResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #29780
    SoonSoon
    Participant

    Hi, would like to ask, is there possible create own id for each cpt without following the current wordpres post id? Said if want to collect cpt entry from frontend form starting with "Prefix-001, Prefix-002", and so on?

    #29808
    Long NguyenLong Nguyen
    Moderator

    Hi,

    No, it's not encouraging to change the post ID of WordPress. The post ID is auto-increment and unique for each post so you do not need to change it. You can create a custom field and add any field type to the posts if you want to distinguish them.

    #29845
    SoonSoon
    Participant

    Hi, you're right, I'm actually asking about create another set of running numbers with auto-increment function, is that possible to do by using metabox?

    #29859
    Long NguyenLong Nguyen
    Moderator

    Hi,

    There is no field auto-increment for the post like ID. I think you can create a text field then update it after creating a post with the format prefix_postID.

    Refer to this documentation https://docs.metabox.io/actions/#rwmb_after_save_post

    #29865
    SoonSoon
    Participant

    Noted with thanks...

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