Title: the_shortlink
Published: April 25, 2014
Last modified: August 20, 2026

---

# apply_filters( ‘the_shortlink’, string $link, string $shortlink, string $text, string $title )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#wp--skip-link--target)

Filters the short link anchor tag for a post.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#parameters)󠁿

 `$link`string

Shortlink anchor tag.

`$shortlink`string

Shortlink URL.

`$text`string

Shortlink’s text.

`$title`string

Shortlink’s title attribute. Unused.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#source)󠁿

    ```php
    $link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/link-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/link-template.php#L4287)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/link-template.php#L4287-L4287)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#related)󠁿

| Used by | Description | 
| [the_shortlink()](https://developer.wordpress.org/reference/functions/the_shortlink/)`wp-includes/link-template.php` |

Displays the shortlink for a post.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/the_shortlink/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fthe_shortlink%2F)
before being able to contribute a note or feedback.