I created my own plug-in that allows Wordpress to display data from DB, but I want to be able to pre-check (so-called preview function) with a specific user before publishing it.
I searched by short code, preview, authentication, etc., but I didn't get any tips for the solution.
If you need help, please help us solve this problem.
If you want to preview the draft article, add the extraction criteria so that articles with post_status of 'draft' are also covered (publish:publish draft).
'post_status'=>array('draft','public')
However, if you are loading your own data, you may want to refer to the poststatus in the table:wp_posts.
Also, the preview display is displayed in the get parameter "?preview=true"
© 2024 OneMinuteCode. All rights reserved.