WordPress get the child pages of current page
I want to display the child pages of the current page you are on.
I want to display the child pages of the current page you are on.
I am trying to dynamically insert a page/multiple pages as a child under the current page in my template file, using wp_insert_post, however I need to first check if the page title already exists under the current page, and if it doesn’t exist then to run the code and create the page(s), but don’t want it to create a duplicate page under the current page if the title already exist under the current page only.
I am using this code directly from the codex.