Title: rest_route_for_term
Published: August 11, 2020
Last modified: February 24, 2026

---

# apply_filters( ‘rest_route_for_term’, string $route, WP_Term $term )

## In this article

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

[ Back to top](https://developer.wordpress.org/reference/hooks/rest_route_for_term/?output_format=md#wp--skip-link--target)

Filters the REST API route for a term.

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

 `$route`string

The route path.

`$term`[WP_Term](https://developer.wordpress.org/reference/classes/wp_term/)

The term object.

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

    ```php
    return apply_filters( 'rest_route_for_term', $route, $term );
    ```

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

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

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

Gets the REST API route for a term.

  |

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

| Version | Description | 
| [5.5.0](https://developer.wordpress.org/reference/since/5.5.0/) | Introduced. |

## User Contributed Notes

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