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.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.4.1Restored (un-deprecated).
2.5.0Deprecated in favor of 'term_link' filter.
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More