How to get latest published version of a post
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
- The topic ‘How to get latest published version of a post’ is closed to new replies.