Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    To what end? To be able to view a draft preview, one would need “edit_others_posts” capability, usually limited only to admins and editors. No one else would be able to view it.

    To link to a preview, you’d add an <a> element and set the href attribute to the draft post’s preview URL.

    If you want drafts to show up in the link UI’s auto-suggest list, use the ‘rest_post_search_query’ filter to set the “post_status” query arg to be ['publish','draft'].
    https://developer.wordpress.org/reference/hooks/rest_post_search_query/

Viewing 1 replies (of 1 total)
  • The topic ‘I want to link to a draft page on the post’ is closed to new replies.