Summery Summery

Displays the shortlink for a post.

Syntax Syntax

the_shortlink( string $text = '', string $title = '', string $before = '', string $after = '' )

Description Description

Must be called from inside "The Loop"

Call like the_shortlink( __( ‘Shortlinkage FTW’ ) )

Parameters Parameters


(string) (Optional) The link text or HTML to be displayed. Defaults to 'This is the short link.'

Default value: ''


(string) (Optional) The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.

Default value: ''


(string) (Optional) HTML to display before the link.

Default value: ''


(string) (Optional) HTML to display after the link.

Default value: ''

Source Source

File: wp-includes/link-template.php



Changelog Changelog

Version Description
3.0.0 Introduced.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.