1

I am currently building a custom theme by using WordPress Rest API, ACF and Vuejs.

I am able to delete some data for published pages/posts using rest_prepare_page filter and rest_prepare_post filter. But when I try to preview a page or a post, those two filters don't seem to work. This results in that the preview page will have more data from an actual published page since those data are not deleted in the preview page.

Are there any filters like rest_prepare_post_preview or rest_prepare_page_preview? So I can run my custom filter function to delete data for a preview page as well.

Cheers

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.