Automatically create child pages when saving a (parent) page
Use the save_post action to run some code when a new show is created, then use wp_insert_post to create your child pages. Here’s an example to get you started – First, filter out any saves that are auto-saves, post revisions, auto-drafts, and other post types. Once you know it’s your show type, you can check … Read more