PHPackages                             underpin/taxonomy-loader - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. underpin/taxonomy-loader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

underpin/taxonomy-loader
========================

Taxonomy loader for Underpin

1.1.0(4y ago)01071[1 issues](https://github.com/Underpin-WP/taxonomy-loader/issues)GPL-2.0-or-laterPHP

Since May 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Underpin-WP/taxonomy-loader)[ Packagist](https://packagist.org/packages/underpin/taxonomy-loader)[ RSS](/packages/underpin-taxonomy-loader/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Underpin Taxonomy Loader
========================

[](#underpin-taxonomy-loader)

Loader That assists with registering taxonomy taxonomies to a WordPress website.

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

`composer require underpin/taxonomy-loader`

### Manually

[](#manually)

This plugin uses a built-in autoloader, so as long as it is required *before*Underpin, it should work as-expected.

`require_once(__DIR__ . '/underpin-taxonomies/taxonomies.php');`

Setup
-----

[](#setup)

1. Install Underpin. See [Underpin Docs](https://www.github.com/underpin-wp/underpin)
2. Register new taxonomies menus as-needed.

Example
-------

[](#example)

A very basic example could look something like this.

```
// Register taxonomy
underpin()->taxonomies()->add( 'taxonomy', [
	'post_type'   => 'post',                        // Defaults to post.
	'id'          => 'ingredients',                 // Required. See register_taxonomy
	'description' => 'Ingredients for this recipe', // Human-readable description.
	'name'        => 'Ingredients',                 // Human-readable name. Usually plural. Will set "label" argument if name is unset in args.
	'args'        => [                              // Default atts. See register_taxonomy
		'public' => true,
	],
] );
```

Alternatively, you can extend `Taxonomy` and reference the extended class directly, like so:

```
underpin()->taxonomies()->add('taxonomy-key','Namespace\To\Class');
```

Querying
--------

[](#querying)

A Taxonomy instance includes a method, called `query`, which serves as a wrapper for `new WP_Term_Query`.

This encapsulates queries for this taxonomy in a method, and gives you a place to override exactly *how* this taxonomy is queried, should you decide to extend the class.

```
underpin()->taxonomies()->get( 'taxonomy' )->query();
```

Editing Terms
-------------

[](#editing-terms)

Like querying, Taxonomy instances includes a method called `save` which serves as a wrapper for `wp_insert_term`and `wp_update_term`. It also includes notice-logging so you can track what happens on a request.

This encapsulates save actions for this taxonomy in a set of methods, and gives you a place to override exactly *how*this taxonomy is saved, should you decide to extend the class.

```
underpin()->taxonomies()->get( 'taxonomy' )->save( [/* see wp_insert_post */] );
```

Deleting Terms
--------------

[](#deleting-terms)

This works in the same way as `save` and `query`. It includes logging, and provides a way to encapsulate the action.

```
underpin()->taxonomies()->get( 'taxonomy' )->delete( $term );
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~200 days

Total

2

Last Release

1633d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e6206223bd6f2a57b8ac80605b1b5c3521faaec18ad3f20f25fb728a9a13784?d=identicon)[tstandiford](/maintainers/tstandiford)

---

Top Contributors

[![alexstandiford](https://avatars.githubusercontent.com/u/8210827?v=4)](https://github.com/alexstandiford "alexstandiford (15 commits)")

---

Tags

taxonomyunderpinwordpress

### Embed Badge

![Health badge](/badges/underpin-taxonomy-loader/health.svg)

```
[![Health](https://phpackages.com/badges/underpin-taxonomy-loader/health.svg)](https://phpackages.com/packages/underpin-taxonomy-loader)
```

###  Alternatives

[metabor/statemachine

Statemachine in PHP 5.3

103150.7k2](/packages/metabor-statemachine)

PHPackages © 2026

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