WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/post permalink


This function has been deprecated since Version 4.4. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use get_permalink instead.

Description

Returns the permalink for a post with a custom post type.

Usage

 <?php echo post_permalink$ID ); ?>  Echos the permalink url for the ID passed in

Parameters

$post_id
(integer) (required) ID of the post or page that you wish to retrieve the link for.
Default: 0

Examples

Change Log

Source File

post_permalink() is located in wp-includes/link-template.php.

Related

get_permalink(), the_permalink(), post_permalink(), permalink_anchor(), permalink_single_rss()

See also index of Function Reference and index of Template Tags.