PHPackages                             askupa-software/amarkal-taxonomy - 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. askupa-software/amarkal-taxonomy

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

askupa-software/amarkal-taxonomy
================================

A set of utility functions for taxonomies in WordPress

732PHP

Since Dec 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/amarkal/amarkal-taxonomy)[ Packagist](https://packagist.org/packages/askupa-software/amarkal-taxonomy)[ RSS](/packages/askupa-software-amarkal-taxonomy/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

amarkal-taxonomy [![Build Status](https://camo.githubusercontent.com/d444f3e2e80933ce01a243ef674343414c1cbcfdf5da9cbc3162929e00bfb183/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616d61726b616c2f616d61726b616c2d7461786f6e6f6d792f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/amarkal/amarkal-taxonomy/build-status/master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/a6596d2b13dd99e61c44d1c68ee59207e120383c17a938e0222d06bc76e026fe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616d61726b616c2f616d61726b616c2d7461786f6e6f6d792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/amarkal/amarkal-taxonomy/?branch=master) [![License](https://camo.githubusercontent.com/d188773d1e42345ca962ea6fc380b95718673e52fe59160bc38e5889034e3289/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d332e302532422d7265642e737667)](https://raw.githubusercontent.com/amarkal/amarkal-taxonomy/master/LICENSE)
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#amarkal-taxonomy---)

A set of utility functions for taxonomies in WordPress.

**Tested up to:** WordPress 4.7
**Dependencies**: *[amarkal-ui](https://github.com/amarkal/amarkal-ui)*

[![amarkal-taxonomy](https://camo.githubusercontent.com/c7cb0ebe7efeab90979d40fe0e490e2e7da0bae1192a0a329e69811478d1aea9/68747470733a2f2f61736b757061736f6674776172652e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031352f30342f616d61726b616c2d7461786f6e6f6d792e706e67)](https://camo.githubusercontent.com/c7cb0ebe7efeab90979d40fe0e490e2e7da0bae1192a0a329e69811478d1aea9/68747470733a2f2f61736b757061736f6674776172652e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031352f30342f616d61726b616c2d7461786f6e6f6d792e706e67)

Overview
--------

[](#overview)

**amarkal-taxonomy** lets you add custom fields to taxonomies in WordPress, and optionally add columns to the taxonomy terms table. More utility functions will be added in the future.

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

[](#installation)

### Via Composer

[](#via-composer)

If you are using the command line:

```
$ composer require askupa-software/amarkal-taxonomy:dev-master

```

Or simply add the following to your `composer.json` file:

```
"require": {
    "askupa-software/amarkal-taxonomy": "dev-master"
}
```

And run the command

```
$ composer install

```

This will install the package in the directory `vendors/askupa-software/amarkal-taxonomy`. Now all you need to do is include the composer autoloader.

```
require_once 'path/to/vendor/autoload.php';
```

### Manually

[](#manually)

Download [amarkal-ui](https://github.com/amarkal/amarkal-ui/archive/master.zip) and [amarkal-taxonomy](https://github.com/amarkal/amarkal-taxonomy/archive/master.zip) from github and include them in your project.

```
require_once 'path/to/amarkal-ui/bootstrap.php';
require_once 'path/to/amarkal-taxonomy/bootstrap.php';
```

Reference
---------

[](#reference)

### amarkal\_taxonomy\_add\_field

[](#amarkal_taxonomy_add_field)

*Add a field to the add &amp; edit forms of a given taxonomy.*

```
amarkal_taxonomy_add_field( $taxonomy_name, $field_type, $field_props )
```

This function can be used to add fields to the 'add term' and 'edit term' taxonomy forms. See [amarkal-ui](https://github.com/amarkal/amarkal-ui/) for supported field types, or register your own field type using `amarkal_ui_register_component`.

**Parameters**

- `$taxonomy_name` (*String*) Specifies the taxonomy name, e.g. 'category'.
- `$field_name` (*String*) Specifies the name/id of the field.
- `$field_props` (*Array*) Specifies the UI component's properties. This array should have the original UI component properties as specified in [amarkal-ui](https://github.com/amarkal/amarkal-ui), as well as the following:
    - `type` (*String*) Specifies the type of the field to add. One of the core `amarkal-ui` components or a registered custom component.
    - `title` (*String*) Specifies the form title for this field.
    - `description` (*String*) Specifies a short description that will be printed below the field.
    - `table` (*Array*) An associative array with the following arguments:
        - `show` (*Boolean*) Specifies whether to add a column for this field in the taxonomy terms table.
        - `sortable` (*Boolean*) Specifies whether to make the column for this field sortable.

**Example Usage**

```
// Add a text field to the 'category' taxonomy 'add' & 'edit' forms:
amarkal_taxonomy_add_field('category', 'cat_icon', array(
    'type'        => 'text',
    'title'       => 'Icon',
    'description' => 'The category\'s icon',
    'table'       => array(
        'show'      => true,  // Add a column to the terms table
        'sortable'  => true   // Make that column sortable
    )
));

// Then you can retrieve the data using:
$icon = get_term_meta( $term_id, 'cat_icon', true );
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/968f78380ddac9ca295244f1cd8d53e3abfe572a0a7351e9bc1b7fc2f85e6bfe?d=identicon)[askupasoftware](/maintainers/askupasoftware)

---

Top Contributors

[![ykadosh](https://avatars.githubusercontent.com/u/7763083?v=4)](https://github.com/ykadosh "ykadosh (25 commits)")

---

Tags

amarkalwordpresswordpress-framework

### Embed Badge

![Health badge](/badges/askupa-software-amarkal-taxonomy/health.svg)

```
[![Health](https://phpackages.com/badges/askupa-software-amarkal-taxonomy/health.svg)](https://phpackages.com/packages/askupa-software-amarkal-taxonomy)
```

###  Alternatives

[mediawiki/cargo

A MediaWiki extension that allows for the storage and querying of data contained within templates.

353.8k](/packages/mediawiki-cargo)

PHPackages © 2026

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