Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 876 Bytes

create.md

File metadata and controls

35 lines (21 loc) · 876 Bytes

wp views view create

Creates a new View.

OPTIONS

[--name=<string>] : The name of the WPA. Default: random string.

[--view_purpose=<string>] : The WordPress archive purpose Can take values: all, parametric. Default: all.

[--usage_type=<string>] : The usage group type. Can take values: post_types, users, taxonomies.

[--orderby=<string>] : Field slug for Posts View to be ordered by.

[--users_orderby=<string>] : User field slug for Users View to be ordered by.

[--taxonomy_orderby=<string>] : Taxonomy Field slug for Taxonomy View to be ordered by.

[--order=<string>] : Order direction Can take values: DESC, ASC.

[--porcelain] : prints the created View ID.

EXAMPLES

wp views view create --name="Test Thingy" --usage_type="post_types" --usage="cest" --orderby="post_title" --order="ASC" --porcelain