A WordPress-centric search engine for devs and theme authors



get_the_permalink ›

Since3.9.0
Deprecatedn/a
get_the_permalink ( $post = 0, $leavename = false )
Parameters: (2)
  • (int|WP_Post) $post Optional. Post ID or post object. Default is the global `$post`.
    Required: No
    Default:
  • (bool) $leavename Optional. Whether to keep post name or page name. Default false.
    Required: No
    Default: false
See:
Returns:
  • (string|false) The permalink URL or false if post does not exist.
Defined at:
Codex:

Retrieves the full permalink for the current post or post ID.

This function is an alias for get_permalink().



Source

function get_the_permalink( $post = 0, $leavename = false ) {
	return get_permalink( $post, $leavename );
}