I have an external database besides WordPress which has a table with genealogical data. In WordPress, I have created a Custom Post Type (CPT) and for these genealogical records. There is also a related custom field belonging to the CPT post.
Now I am looking for the code to auto-create these CPT posts and fill the custom field with an URL; one per row in the external database. How can this be accomplished with