Skip to main content

wp theme get

Overview

Extract metadata for a specific theme. Access version, author, description, template parent, and filesystem path directly.

What It Does​

wp theme get reads the style.css header of the specified theme and returns its properties.

Syntax​

wp theme get <slug> [OPTIONS]

Arguments & Options​

FlagDescription
--field=FIELDReturn only a specific field (e.g., version, author)
--format=FORMATtable, json, yaml, csv

Basic Usage​

Get all details​

wp theme get twentytwentyfour

Get только version​

wp theme get twentytwentyfour --field=version

Check if theme is a child theme​

wp theme get my-child-theme --field=parent_theme

Real-World Scenarios​

Scenario 1: Automated Version Logging​

VERSION=$(wp theme get $(wp theme list --status=active --field=name) --field=version)
echo "Active theme version: $VERSION"

Scenario 2: Audit Theme Authors​

wp theme get astra --field=author

Quick Reference​

wp theme get <slug> # All details
wp theme get <slug> --field=path # Filesystem path
wp theme get <slug> --format=json # JSON output

Next Steps​