WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/post permalink

Contents

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.