Docs/Integrations/Taxonomies
Taxonomies
Register and manage custom taxonomies from Pure Fields → Taxonomies — hierarchical (category-style) or flat (tag-style), attached to any post type.
Like Post Types, taxonomy registration is visual-only: Pure Fields stores your configuration and calls WordPress's own register_taxonomy() with it on init. Attach a taxonomy to a built-in post type (post) or to a custom post type you've registered in the same Post Types screen.
Reading and querying terms
Once registered, a Pure Fields taxonomy behaves exactly like any WordPress taxonomy — use the standard functions against it:
// List terms attached to the current post.
$terms = get_the_terms( get_the_ID(), 'project_category' );
// Query posts by term.
$query = new WP_Query( [
'post_type' => 'project',
'tax_query' => [ [
'taxonomy' => 'project_category',
'field' => 'slug',
'terms' => 'branding',
] ],
] );
The post_select field type (Select2) can target a specific post type, which is handy when a metabox or option field needs to link to one item of a custom post type rather than filtering by taxonomy term.