category_link WordPress Filter Hook
The category_link hook is used to modify the URL of a category archive. This is useful if you want to change the structure of your category archives, or if you need to add a custom parameter to the URL.
apply_filters( 'category_link', string $termlink , int $term_id ) #
Filters the category link.
Parameters
- $termlink
(string)Category link URL.
- $term_id
(int)Term ID.
Source
File: wp-includes/taxonomy.php
Changelog
Version | Description |
---|---|
5.4.1 | Restored (un-deprecated). |
2.5.0 | Deprecated in favor of 'term_link' filter. |
1.5.0 | Introduced. |