Skip to content
Easily Create Custom WordPress Taxonomies
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Removed duplicated line of code that added 'show_in_rest' option twice May 15, 2019
.editorconfig Taxonomy Class Feb 14, 2018
.gitignore Taxonomy Class Feb 14, 2018
.travis.yml Taxonomy Class Feb 14, 2018
README.md Updating functionality & README Feb 14, 2018
codesniffer.ruleset.xml php-lib init Feb 14, 2018
composer.json Linting cleanup Feb 14, 2018
composer.lock Linting cleanup Feb 14, 2018
licence php-lib init Feb 14, 2018

README.md

This library will allow you to easily create custom taxonomies

Installation

The easiest way to install this package is by using composer from your terminal:

composer require moxie-lean/wp-taxonomy

Or by adding the following lines on your composer.json file

"require": {
  "moxie-lean/wp-taxonomy": "*"
}

This will download the file from the packagist site and the latest version located on master branch of the repository.

After that you can need to include the autoload.php file in order to be able to autoload the class during the object creation.

include '/vendor/autoload.php';

Using wp-taxonomy

Modeled after WP-CPT

$tax = new \Lean\Taxonomy([
    'name' => 'Taxonomy Name',
    'singular' => 'Single Tax',
    'plural' => 'Multiple Taxes',
    'slug' => 'new-taxonomy',
    'objects' => [ 'cpt-one', 'cpt-two' ]
]);
$tax->init();
You can’t perform that action at this time.