1

I have a custom post type that I've made change to a new custom post status value ("pending-change" I call it) when a change is made to any live "published" post. This works nicely and is a way for me to control authors from constantly updating published posts without the need for further checking by editors/admins.

My "pending-change" status is public which means that posts of the new status do appear in the front-end website. This is half way to what I want. All I need now is for the actual post that appears during this status to switch to the PREVIOUS revision of "publish" status. In other words, show the last known ok'd copy of the post.

I've found functions in the codex such as wp_get_post_revision() but they seem to make my site have some fatal white page error and are a dead end. So I was wondering if anyone else has a simple way to alter the standard query to switch revision back one step.

Is there functions for this at all or is it all going to need manual new code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.