Site docs are currently being updated 🚧 Thank you for your patience! 🙏

Taxonomy Terms

ACF Extended
Last Upated: Thursday, Feb 1, 2024

acfe_taxonomy_terms

The Taxonomy Terms field is a custom ACF Field Type made available by the Advanced Custom Fields Extended plugin and displays a Taxonomy Terms selector as radio, checkbox or select field type.

Resolve Type

Fields of the acfe_taxomomy_terms field type resolve to a "List of TermNode" in the GraphQL Schema. This supports singular and multiple selections as a list can be either one or more than one values. The TermNode interface represents terms of Any Taxonomy and using Fragments fields of each Taxonomy Type can be selected as needed.

Field Settings

Below you will find information about how various ACF field settings can impact how the field will map to the GraphQL Schema and/or modify resolution of the field when queried.

Field Configuration

<?php
add_action( 'acf/include_fields', function() {
if ( ! function_exists( 'acf_add_local_field_group' ) ) {
return;
}
acf_add_local_field_group(
[
{
"key": "my_field_group_",
"title": "My Field Group with acfe_taxonomy_terms",
"show_in_graphql": 1,
"graphql_field_name": "myFieldGroupWithAcfeTaxonomyTerms",
"map_graphql_types_from_location_rules": 0,
"graphql_types": [
"Page"
],
"fields": [
{
"key": "my_field_",
"label": "My Field",
"name": "my_field",
"type": "acfe_taxonomy_terms",
"show_in_graphql": 1,
"graphql_field_name": "myFieldWithAcfeTaxonomyTerms"
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "page"
}
]
]
}
]
);
});

Querying the Taxonomy Terms Field field

Previous
Taxonomy