WordPress.org

Forums

Set draft page as parent (2 posts)

  1. rooodini
    Member
    Posted 4 years ago #

    Hi there,

    WordPress doesn't allow you to set a draft page as parent. Or a private page, for that matter. Is there a reason why draft pages can't be set as parent? If not, I'll create a ticket for this.

    You can work around it by temporarily publishing a page, setting it as parent, then making it draft again. The fact that this is possible suggests that not being able to set a draft page as parent is a bug rather than a feature.

    I've seen a trac ticket for the private page problem, but I wonder whether (due to permissions) the draft page version might be an easier bug to fix.

    Thanks,
    Andy

  2. rooodini
    Member
    Posted 4 years ago #

    You can work around it by temporarily publishing a page, setting it as parent, then making it draft again.

    This only works because wordpress doesn't immediately reset the page parents for child pages. The next time these child pages are updated, their page parents are reset.

    Probably makes sense to do it that way. Otherwise, if you set a root page to draft you would immediately lose all of your page hierarchy. Not to mention it could involve quite a lot of processing all at once (recursing through the tree of pages).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags