WPDev.one
Core Function
View Source on Trac ↗

get_term_link()

get_term_link( mixed $term, mixed $taxonomy = '' )

Generates a permalink for a taxonomy term archive.

Parameters 1 required

Name / Type Description
(WP_Term

| int | string) $term The term object, ID, or slug whose link will be retrieved.

Required
$taxonomy
string

Optional. Taxonomy. Default empty.

Return Value

((string)
| WP_Error) URL of the taxonomy term archive on success, WP_Error if term does not exist.

Function Information

Since Version
2.5.0
Source File
wp-includes/taxonomy.php
Advertisement