wp scaffold post-type
Generates PHP code for registering a custom post type.
Synopsis
bash
wp scaffold post-type <slug> [--label=<label>] [--textdomain=<textdomain>] [--dashicon=<dashicon>] [--theme] [--plugin=<plugin>] [--raw] [--force]Options
[–label= The text used to translate the update messages.
[–textdomain=
[–dashicon=
[–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_post_type() call and nothing else.
[–force] Overwrite files that already exist.
Examples
bash
# Generate a 'movie' post type for the 'simple-life' theme
$ wp scaffold post-type movie --label=Movie --theme=simple-life
Success: Created '/var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php'.