WP-CLI command for theme activation and setting options
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.travis.yml
README.md
composer.json
ruleset.xml
theme-activation-command.php

README.md

Build Status

Installation

The quick and dirty method is to drop theme-activation-command.php into your /mu-plugins/ directory.

For other methods, please refer to WP-CLI's Community Packages wiki.

Usage

Running the command without any options will activate Sage with all of the default options.

wp theme activation

  1. Activates Sage
  2. Creates page called Home and sets as static front page
  3. Creates a new menu called Primary Navigation and adds newly created home page to it

Options

[<theme>]

The theme name to activate. Default: 'sage'

[--show-on-front=<page-type>]

What to show on the front page. Options are: 'posts', 'page'. Default: 'page'

[--permalink-structure=<permalink-string>]

Permalink structure. Default: '/%postname%/'

[--skip-navigation]

Skips creating default Primary Navigation.

Examples

wp theme activation
wp theme activation --show-on-front=page --permalink-structure='/%year%/%postname%/' --skip-navigation