How I can use an absolute random post_id in wp-admin at wp_insert_post
? I need stored in wp-admin a unique random post_id, but not I have only: 2210, 2212, 2214. As I understand it, this will not work because of the uniqueness of the keys in the database.
-
2the post ID is the primary key of the table and cannot be modified. if you want a random and custom value for each post, you can set it in a post meta (update_post_meta)– KapertoDec 3, 2019 at 12:33
-
What is the intention behind? Can you elaborate your goal?– Fabian MarzDec 3, 2019 at 13:14
-
the essence is this: when a user submits a request, a post is created in the admin panel: name, email, etc. and the user gets a unique number in the system by which he can find himself, for these purposes I need use number and slug name - random which consists of 10 digits, now in wp-admin via wp_insert_post i can get only short number– LerryDec 3, 2019 at 15:02
Add a comment
|