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

---

# apply_filters( ‘tag_link’, string $termlink, int $term_id )

## In this article

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

Filters the tag link.

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

 `$termlink`string

Tag link URL.

`$term_id`int

Term ID.

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

    ```php
    $termlink = apply_filters( 'tag_link', $termlink, $term->term_id );
    ```

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

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

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

Generates a permalink for a taxonomy term archive.

  |

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

| Version | Description | 
| [5.4.1](https://developer.wordpress.org/reference/since/5.4.1/) | Restored (un-deprecated). | 
| [2.5.0](https://developer.wordpress.org/reference/since/2.5.0/) | Deprecated in favor of [‘term_link’](https://developer.wordpress.org/reference/hooks/term_link/) filter. | 
| [2.3.0](https://developer.wordpress.org/reference/since/2.3.0/) | Introduced. |

## User Contributed Notes

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