WordPress.org

Ready to get started?Download WordPress

Forums

How to get latest published version of a post (1 post)

  1. kwbock
    Member
    Posted 1 year ago #

    I am building a custom theme. In this theme I would like to be able to access the latest published version of a post, where the latest version may be in Draft of Pending Review but a previous version had been published.

    So the flow is like this.

    Create a new post and publish it.
    This post will now appear on the site.
    The author then goes back and edits the post, but it is pending review now by others. I want the previously published version of the post to stay visible on the site while the new revision is pending review.
    Once the new revision has been published I want that version of the post to show up.

    How would I formulate this query?

    Thanks for your help

Topic Closed

This topic has been closed to new replies.

About this Topic