PHPackages                             stuttter/wp-term-meta - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. stuttter/wp-term-meta

AbandonedArchivedWordpress-plugin

stuttter/wp-term-meta
=====================

Metadata, for taxonomy terms

0.1.4(10y ago)291426GPLv2 or laterPHPPHP &gt;=5.2

Since Oct 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stuttter/wp-term-meta)[ Packagist](https://packagist.org/packages/stuttter/wp-term-meta)[ Docs](https://github.com/stuttter/wp-term-meta)[ RSS](/packages/stuttter-wp-term-meta/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

WP Term Meta
============

[](#wp-term-meta)

Metadata, for taxonomy terms.

WP Term Meta allows developers to store key/value pairs of data along with a category, tag, or any custom taxonomy.

Installation
============

[](#installation)

- Download and install using the built in WordPress plugin installer.
- Activate in the "Plugins" area of your admin by clicking the "Activate" link.
- No further setup or configuration is necessary.

Usage
=====

[](#usage)

### add\_term\_meta()

[](#add_term_meta)

```
/**
 * Add metadata field to a term.
 *
 * @since 0.1.0
 * @param  int     $term_id     Post ID
 * @param  string  $meta_key    Metadata name
 * @param  mixed   $meta_value  Metadata value
 * @param  bool    $unique      Optional, default is false. Whether the same key
 *                              can be duplicated
 *
 * @return bool False for failure. True for success.
 */

```

### delete\_term\_meta()

[](#delete_term_meta)

```
/**
 * Remove metadata matching criteria from a term.
 *
 * You can match based on the key, or key and value. Removing based on key and
 * value, will keep from removing duplicate metadata with the same key. It also
 * allows removing all metadata matching key if needed.
 *
 * @since 0.1.0
 *
 * @param  int     $term_id    Term ID
 * @param  string  $meta_key   Metadata name
 * @param  mixed   $meta_value Optional. Metadata value
 *
 * @return bool False for failure. True for success.
 */

```

### delete\_term\_meta\_by\_key()

[](#delete_term_meta_by_key)

```
/**
 * Delete everything from term meta matching meta key.
 *
 * @since 0.1.0
 *
 * @param string $term_meta_key Key to search for when deleting.
 *
 * @return bool Whether the term meta key was deleted from the database.
 */

```

### get\_term\_meta()

[](#get_term_meta)

```
/**
 * Retrieve term meta field for a term.
 *
 * @since 0.1.0
 *
 * @param  int     $term_id  Term ID
 * @param  string  $key      The meta key to retrieve
 * @param  bool    $single   Whether to return a single value
 *
 * @return mixed Will be an array if $single is false. Will be value of meta
 *               data field if $single is true
 */

```

### update\_term\_meta()

[](#update_term_meta)

```
/**
 * Update term meta field based on term ID.
 *
 * Use the $prev_value parameter to differentiate between meta fields with the
 * same key and term ID.
 *
 * If the meta field for the term does not exist, it will be added.
 *
 * @since 0.1.0
 *
 * @param  int    $term_id     Term ID
 * @param  string $meta_key    Metadata key
 * @param  mixed  $meta_value  Metadata value
 * @param  mixed  $prev_value  Optional. Previous value to check before removing
 *
 * @return bool False on failure, true if success.
 */

```

### get\_terms()

[](#get_terms)

Use the `meta_query` argument according te the `WP_Meta_Query` specification: [http://codex.wordpress.org/Class\_Reference/WP\_Meta\_Query](http://codex.wordpress.org/Class_Reference/WP_Meta_Query)

```
$terms = get_terms( 'category', array(
        'depth'      => 1,
        'number'     => 100,
        'parent'     => 0,
        'orderby'    => 'order', // Try the "wp-term-order" plugin!
        'order'      => 'ASC',
        'hide_empty' => false,

        // Looky looky!
        'meta_query' => array( array(
                'key' => 'term_thumbnail'
        ) )
) );

```

FAQ
===

[](#faq)

### Does this create new database tables?

[](#does-this-create-new-database-tables)

Yes. It creates a new `wp_termmeta` database table for each site it's activated on.

### Does this modify existing database tables?

[](#does-this-modify-existing-database-tables)

No. All of WordPress's core database tables remain untouched.

### Does this support querying by metadata?

[](#does-this-support-querying-by-metadata)

Yes. It uses the `WP_Meta_Query` class to create the necessary MySQL. You can interface with it by passing a `meta_query` argument into `get_terms()`, by filtering `get_terms_args` or however else you choose.

### Where can I get support?

[](#where-can-i-get-support)

The WordPress support forums:

### Can I contribute?

[](#can-i-contribute)

Yes, please! The number of users needing taxonomy term metadata is growing fast. Having an easy-to-use API and powerful set of functions is critical to managing complex WordPress installations. If this is your thing, please help us out!

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3860d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8b3e78da513af70d22b0a942297a300eef15e3ce8080e877c054ebb83e24d82?d=identicon)[jjj](/maintainers/jjj)

---

Top Contributors

[![JJJ](https://avatars.githubusercontent.com/u/88951?v=4)](https://github.com/JJJ "JJJ (48 commits)")[![pdufour](https://avatars.githubusercontent.com/u/1239145?v=4)](https://github.com/pdufour "pdufour (2 commits)")

---

Tags

database-tablemetatermswordpress

### Embed Badge

![Health badge](/badges/stuttter-wp-term-meta/health.svg)

```
[![Health](https://phpackages.com/badges/stuttter-wp-term-meta/health.svg)](https://phpackages.com/packages/stuttter-wp-term-meta)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k3](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k12](/packages/rainlab-user-plugin)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3164.5k](/packages/starcitizentools-citizen-skin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
