WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/term link

Contents

Description

term_link is a filter applied to the link URL for a term prior to printing by the function get_term_link.

Parameters

$url
(string) (required) The term URL
Default: None
$term
(string) (required) The term object
Default: None
$taxonomy
(string) (required) The taxonomy slug
Default: None

Examples

Append a hashbang at the end of the url

add_filter('term_link', 'term_link_filter', 10);
function term_link_filter( $url, $term, $taxonomy ) {
   
    return $url . "#results";
   
}


Source Files

This filter is applied by:

This page is marked as incomplete. You can help Codex by expanding it.