Title: get_terms_fields
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘get_terms_fields’, string[] $selects, array $args, string[] $taxonomies )

## In this article

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

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

Filters the fields to select in the terms query.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/get_terms_fields/?output_format=md#description)󠁿

Field lists modified using this filter will only modify the term fields returned
by the function when the `$fields` parameter set to ‘count’ or ‘all’. In all other
cases, the term fields in the results array will be determined by the `$fields` 
parameter alone.

Use of this filter can result in unpredictable behavior, and is not recommended.

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

 `$selects`string[]

An array of fields to select for the terms query.

`$args`array

An array of term query arguments.

`$taxonomies`string[]

An array of taxonomy names.

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

    ```php
    $fields = implode( ', ', apply_filters( 'get_terms_fields', $selects, $args, $taxonomies ) );
    ```

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

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

| Used by | Description | 
| [WP_Term_Query::get_terms()](https://developer.wordpress.org/reference/classes/wp_term_query/get_terms/)`wp-includes/class-wp-term-query.php` |

Retrieves the query results.

  |

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

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

## User Contributed Notes

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