WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/permalink anchor

Contents

Description

Outputs a permalink anchor identifier or id (<a id="....) for a post. This is useful for linking to a particular post on a page displaying several posts, such as an archive page. This tag must be within The Loop.

Usage

 <?php permalink_anchor$type ); ?> 

Parameters

$type 
(string) Type of anchor to output. Valid values are:

Example

Inserts the permalink anchor next to a post's title.

<h3><?php permalink_anchor(); ?><?php the_title(); ?></h3>

Change Log

Since: 0.71

Source File

permalink_anchor() 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.