get_preview_post_link ( $post = null, $query_args = array(), $preview_link = '' )

  • (int|WP_Post) post Optional. Post ID or `WP_Post` object. Defaults to global `$post`.
  • (array) query_args Optional. Array of additional query args to be appended to the link. Default empty array.
  • (string) preview_link Optional. Base preview link to be used if it should differ from the post permalink. Default empty.
  • (string|null) URL used for the post preview, or null if the post does not exist.
Defined at:


Retrieves the URL used for the post preview.Allows additional query args to be appended.

Related Functions

get_previous_post_link, get_previous_posts_link, get_edit_post_link, get_previous_posts_page_link, get_delete_post_link

Top Google Results

User discussions

wpseek mobile