wordpress parent child page dropdown

WordPress include private pages in parent dropdown

WordPress only includes published pages in the parent page dropdown, I ran into an issue where both parent and child page were made private so work could be done to the pages, the child pages when edited lost their parent relationship, due to the parent page no longer appearing within the “Parent” dropdown.

Why would you need this?

In my case we wanted to make some changes to the existing pages but needed to do these changes in private until all where complete, it was not until after we re-published the pages, we found the child pages where no longer link to the parent.

Fix

Let’s add the private and pending pages to the parent dropdown menu, allowing us to pre-create pages and child / parent relationships without having to already have published the pages.

This code is provided as it and may require changes to work for your needs.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.