Give a unique ID while saving
When you add a meta box, the post object is passed to the function that outputs your meta box content, and the ID is immediately available. Here’s a quick proof-of-concept that will put the ID in a field in a post meta box when creating a new post: function wpd_sku_meta_box() { add_meta_box( ‘wpd_sku’, ‘SKU’, ‘wpd_render_meta_box’, … Read more