Custom Taxonomy Types
You can also add your Custom Taxonomy Types by editing the /config/plugin.php
file:
config/plugin.php
/*
|--------------------------------------------------------------------------
| Custom Taxonomy Types
|--------------------------------------------------------------------------
|
| Here is where you can register the Custom Taxonomy Types.
|
*/
'custom_taxonomies' => [ '\WPKirk\CustomTaxonomyTypes\MyCustomTaxonomy' ],
The related class will be:
<?php
namespace WPKirk\CustomTaxonomyTypes;
use WPKirk\WPBones\Foundation\WordPressCustomTaxonomyTypeServiceProvider;
class MyCustomTaxonomy extends WordPressCustomTaxonomyTypeServiceProvider {
protected $id = 'wp_kirk_tax';
protected $name = 'Ship';
protected $plural = 'Ships';
protected $objectType = 'wp_kirk_cpt';
}
PHP Bones Command
Using the php bones make:ctt
Bones command, we can quickly create a Custom Taxonomy Type Service Provider.