mirror of
https://gh.wpcy.net/https://github.com/wp-cli/handbook.git
synced 2026-04-25 19:20:41 +08:00
38 lines
1.2 KiB
Markdown
38 lines
1.2 KiB
Markdown
# wp theme
|
|
|
|
Manages themes, including installs, activations, and updates.
|
|
|
|
See the WordPress [Theme Handbook](https://developer.wordpress.org/themes/) developer resource for more information on themes.
|
|
|
|
### EXAMPLES
|
|
|
|
# Install the latest version of a theme from wordpress.org and activate
|
|
$ wp theme install twentysixteen --activate
|
|
Installing Twenty Sixteen (1.2)
|
|
Downloading install package from http://downloads.wordpress.org/theme/twentysixteen.1.2.zip...
|
|
Unpacking the package...
|
|
Installing the theme...
|
|
Theme installed successfully.
|
|
Activating 'twentysixteen'...
|
|
Success: Switched to 'Twenty Sixteen' theme.
|
|
Success: Installed 1 of 1 themes.
|
|
|
|
# Get details of an installed theme
|
|
$ wp theme get twentysixteen --fields=name,title,version
|
|
+---------+----------------+
|
|
| Field | Value |
|
|
+---------+----------------+
|
|
| name | Twenty Sixteen |
|
|
| title | Twenty Sixteen |
|
|
| version | 1.2 |
|
|
+---------+----------------+
|
|
|
|
# Get status of theme
|
|
$ wp theme status twentysixteen
|
|
Theme twentysixteen details:
|
|
Name: Twenty Sixteen
|
|
Status: Active
|
|
Version: 1.2
|
|
Author: the WordPress team
|
|
|
|
|