get_post_permalink


get_post_permalink ( $id = 0, $leavename = false, $sample = false )

Parameters:
  • (int|WP_Post) $id Optional. Post ID or post object. Default is the global `$post`.
  • (bool) $leavename Optional, defaults to false. Whether to keep post name. Default false.
  • (bool) $sample Optional, defaults to false. Is it a sample permalink. Default false.
Returns:
  • (string|WP_Error) The post permalink.
Defined at:

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