Title: rest_route_for_taxonomy_items
Published: February 3, 2022
Last modified: August 20, 2026

---

# apply_filters( ‘rest_route_for_taxonomy_items’, string $route, WP_Taxonomy $taxonomy )

## In this article

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

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

Filters the REST API route for a taxonomy.

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

 `$route`string

The route path.

`$taxonomy`[WP_Taxonomy](https://developer.wordpress.org/reference/classes/wp_taxonomy/)

The taxonomy object.

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

    ```php
    return apply_filters( 'rest_route_for_taxonomy_items', $route, $taxonomy );
    ```

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

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

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

Gets the REST API route for a taxonomy.

  |

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

| Version | Description | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.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_taxonomy_items%2F)
before being able to contribute a note or feedback.