wp scaffold

Generate code for post types, taxonomies, plugins, child themes, etc.

GitHub Issues

EXAMPLES

# Generate a new plugin with unit tests
$ wp scaffold plugin sample-plugin
Success: Created plugin files.
Success: Created test files.

# Generate theme based on _s
$ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe"
Success: Created theme 'Sample Theme'.

# Generate code for post type registration in given 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

SUBCOMMANDS

Name Description
wp scaffold child-theme

Generate child theme based on an existing theme.

wp scaffold plugin

Generate starter code for a plugin.

wp scaffold plugin-tests

Generate files needed for running PHPUnit tests in a plugin.

wp scaffold post-type

Generate PHP code for registering a custom post type.

wp scaffold taxonomy

Generate PHP code for registering a custom taxonomy.

wp scaffold theme-tests

Generate files needed for running PHPUnit tests in a theme.

wp scaffold _s

Generate starter code for a theme based on _s.

Command documentation is regenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.