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.
See edit at bottom.
I have an old site that has sooo many child pages that I’d like to limit the return of child pages on a current page to just a specific year so that I can pull each year into an accordion.
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 currently have a function that checks to see if the page is a parent, and if so, do stuff. But I also want to check to see if the parent has a child page that has a certain slug.
How can I get a Previous / Next navigation that only navigates the child pages of the current page?
I have a bit of a tricky one…
Can anyone please help me to with the wp_query.
I have a page structure like this.
I’m looking for a way to only allow users to create new subpages once there are nine pages that are parents/root pages. Once there are nine parent pages when trying to create a new parent the users will get an error message.