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:
  • 6: .

Description

Retrieves the permalink for a post of a custom post type.

Related Functions

post_permalink, get_the_permalink, get_permalink, get_post_format_link, get_blog_permalink

Top Google Results

User discussions

wpseek mobile