Title: get_object_terms
Published: April 23, 2015
Last modified: August 20, 2026

---

# apply_filters( ‘get_object_terms’, WP_Term[]|int[]|string[]|string $terms, int[] $object_ids, string[] $taxonomies, array $args )

## In this article

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

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

Filters the terms for a given object or objects.

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

 `$terms`[WP_Term](https://developer.wordpress.org/reference/classes/wp_term/)[]
|int[]|string[]|string

Array of terms or a count thereof as a numeric string.

`$object_ids`int[]

Array of object IDs for which terms were retrieved.

`$taxonomies`string[]

Array of taxonomy names from which terms were retrieved.

`$args`array

Array of arguments for retrieving terms for the given object(s). See [wp_get_object_terms()](https://developer.wordpress.org/reference/functions/wp_get_object_terms/)
for details.

More Arguments from wp_get_object_terms( … $args )

See [WP_Term_Query::__construct()](https://developer.wordpress.org/reference/classes/wp_term_query/__construct/)
for supported arguments.

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

    ```php
    $terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );
    ```

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

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

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

Retrieves the terms associated with the given object(s), in the supplied taxonomies.

  |

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

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

## User Contributed Notes

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