WordPress: Automatically add child-posts

WordPress: Automatically add child-posts

In a recent project, a requirement of the WordPress site I was building was to automatically create child posts when adding a post of a certain type. It turns out that this is fairly easy using the¬†wp_insert_post function, but there are a number of factors to take into consideration (not least not creating a new […]