get_post_permalink
get_post_permalink ( $post = 0, $leavename = false, $sample = false )
Parameters:- (int|WP_Post) post Optional. Post ID or post object. Default is the global `$post`.
- (bool) leavename Optional. Whether to keep post name. Default false.
- (bool) sample Optional. Is it a sample permalink. Default false.
Returns:- (string|false) The post permalink URL. False if the post does not exist.
Defined at:Change Log: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Description
Retrieves the permalink for a post of a custom post type.