wp scaffold taxonomy
Generates PHP code for registering a custom taxonomy.
Synopsis
bash
wp scaffold taxonomy <slug> [--post_types=<post-types>] [--label=<label>] [--textdomain=<textdomain>] [--theme] [--plugin=<plugin>] [--raw] [--force]Options
[–post_types=
[–label= The text used to translate the update messages.
[–textdomain=
[–theme]
Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with --theme=<theme> to have the file placed in that theme.
[–plugin=
[–raw]
Just generate the register_taxonomy() call and nothing else.
[–force] Overwrite files that already exist.
Examples
bash
# Generate PHP code for registering a custom taxonomy and save in a file
$ wp scaffold taxonomy venue --post_types=event,presentation > taxonomy.php