Add Custom Post Type on the Fly or create an array

use $wp_insert_post function to create posts and to create sub posts of this use this function again and set post_parent = “name of post you created” see list of all arguments and usage of this function wp_insert_post

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)