How to dynamically set post IDs by post type
-
I’m having a problem with my post IDs getting duplicated and overwritten. I have an external events database that I am tapping into with wp_insert_posts and have been importing IDs along with post content. However, if I made a post previously with that happens to have the same ID as one of the events, the former gets overwritten and replaced with the new event. Since these imported events have to have this very specific ID that follows a very specific scheme (they all start with 3), I want all my other posts to have an ID that is very different so that there is no chance of being overwritten.
Is there a way to tell wordpress to always generate IDs that start with a certain number or follow any certain defined scheme?
The topic ‘How to dynamically set post IDs by post type’ is closed to new replies.