get_the_permalink() – Retrieves the full permalink for the current post or post ID.

You appear to be a bot. Output may be restricted

Description

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

This function is an alias for get_permalink().

Usage

$string|false = get_the_permalink( $post, $leavename );

Parameters

$post
( int|WP_Post ) optional – Optional. Post ID or post object. Default is the global `$post`.
$leavename
( bool ) optional – Optional. Whether to keep post name or page name. Default false.

Returns

string|false The permalink URL. False if the post does not exist.

Source

File name: wordpress/wp-includes/link-template.php
Lines:

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

 View on GitHub View on Trac