---
title: "Add Custom Fields to Taxonomy Terms in WordPress"
url: https://nexterwp.com/docs/custom-fields-taxonomy-terms-wordpress/
date: 2026-09-14
modified: 2026-11-12
lang: en
author: "Aditya Sharma"
description: "Categories and custom taxonomy terms can carry their own fields — a colour, an icon, a longer description than the built-in one. What It Does A Taxonomy location rule puts..."
image: https://nexterwp.com/wp-content/uploads/2026/09/custom-fields-taxonomy-terms-wordpress-1024x519.jpg
word_count: 247
---

# Add Custom Fields to Taxonomy Terms in WordPress

## Key Takeaways

- Taxonomy location rule places a field group on taxonomy term add and edit screens, and the values are stored as term meta.
- Custom fields on categories and other taxonomy terms support a colour or icon per category, a longer formatted description than the core term description, and a featured image for a term.
- nxt_field_value( 'colour', 'term_' . $term_id ) reads a term value by passing a term selector, and deleting a term deletes its field values with it.

Categories and custom taxonomy terms can carry their own fields — a colour, an icon, a longer description than the built-in one.

## What It Does

A **Taxonomy** location rule puts a field group on the term add and edit screens. Values are stored as term meta.

## Before You Start

- A registered taxonomy with at least one term.- A field group to attach.

## Put Fields on a Term

- Open the field group and find **Location Rules**.

![The Location Rules panel, where the Taxonomy rule is set](https://nexterwp.com/wp-content/uploads/2026/09/nxt-fields-s-location-rules.webp)

- Set the parameter to **Taxonomy**.

- Choose the taxonomy.

- Click **Update**.

- Open a term for editing and confirm the fields appear.

## When to Use It

- A colour or icon per category, used on archive pages.- A longer, formatted description than the core term description.- A featured image for a term.

## Display the Value

Read a term value by passing a term selector:

`<?php
$term_id = get_queried_object_id();
$colour = nxt_field_value( 'colour', 'term_' . $term_id );
if ( $colour ) {
printf( '<span>', esc_attr( $colour ) );
}`

## Limitations

- Values are term meta, so they belong to the term rather than to any post in it.- Deleting a term deletes its field values with it.

## Troubleshooting

### The fields appear when editing a term but not when adding one

Some field types render differently on the add-term form, which is a narrower screen. Save the term first, then edit it.

### A template returns nothing

Pass the term selector — `'term_' . $id`. Without it the function reads the current post.

## Related Docs

- [Location rules overview](https://nexterwp.com/docs/location-rules-custom-fields-wordpress/)- [Create a custom taxonomy](https://nexterwp.com/docs/create-custom-taxonomy-wordpress/)- [Taxonomy field](https://nexterwp.com/docs/wordpress-taxonomy-field/)

## Frequently Asked Questions

**Q: How do custom fields on taxonomy terms work in WordPress?**
A: A Taxonomy location rule puts a field group on the term add and edit screens, and the values are stored as term meta. That matters because the data belongs to the term itself, not to posts using that term. Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter provides this term-level setup for things like category colours, icons, and longer descriptions.

**Q: What are the best uses for custom fields on taxonomy terms?**
A: The strongest use cases are term-specific visuals and metadata: a colour or icon per category for archive pages, a longer formatted description than the core term description, or a featured image for a term. That keeps presentation data attached to the taxonomy instead of each post. In practice, this is useful when one category needs its own styling or when the built-in term description is too limited.

**Q: Why do taxonomy term fields show on edit but not on add?**
A: Some field types render differently on the add-term form because that screen is narrower. The practical fix is to save the term first, then edit it. That workflow matters because the field group is still attached to the taxonomy, but the initial add screen can hide or compress certain fields. This is one of those layout issues that looks like a setup problem when it is really a screen-size limitation.

**Q: How do I display a custom field value from a taxonomy term in PHP?**
A: Read it with a term selector such as `term_` plus the term ID. The page’s example uses `get_queried_object_id()` and `nxt_field_value( 'colour', 'term_' . $term_id )`, then prints the value only if it exists. That selector is the key detail because without it the function reads the current post instead of the taxonomy term.

**Q: What should I know before adding custom fields to taxonomy terms?**
A: You need two things in place: a registered taxonomy with at least one term, and a field group to attach. Without both, there is nothing for the location rule to target and nothing to edit. In other words, this is not just about creating fields. The taxonomy has to exist first so the field group can be placed on its add and edit screens.

**Q: What happens to custom field values if I delete a taxonomy term?**
A: The values are stored as term meta, so they belong to that specific term rather than to posts inside it. If you delete the term, its field values go with it. That is an important gotcha when using terms as content containers: anything tied to that term should be treated as disposable along with the taxonomy entry itself.
