Skip to content

hamworks/wp-taxonomy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp-taxonomy

$builder = new HAMWORKS\WP\Taxonomy\Builder( 'slug', 'name', [ 'post' ] );
$builder->set_options( 
    [
        'public'      => true,
        'description' => '',
        'has_archive' => true,
    ]
);
$builder->create();

Set initial term.

$builder = new HAMWORKS\WP\Taxonomy\Builder( 'slug', 'name', [ 'post' ] );
$builder->set_options( 
    [
        'public'      => true,
        'description' => '',
        'has_archive' => true,
    ]
);
$your_term = new \HAMWORKS\WP\Taxonomy\Term( 'name', 'slug' );
$builder->set_initial_term( $your_term );
$builder->create();