Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 718 Bytes

File metadata and controls

28 lines (17 loc) · 718 Bytes

wp types association query

Displays posts related to a given post.

OPTIONS

--post=<number> : The ID of the post.

--relationship=<string> : The relationship slug.

[--role-to-return=<string>] : The role to return.

[--query-by-role=<string>] : The role to query by.

[--format=<format>] : The format of the output. Can take values: table, csv, json, count, yaml. Default: table.

EXAMPLES

wp types association query --post=123 --relationship=slug

wp types association query --post=123 --relationship=slug --role-to-return=child --query-by-role=parent

wp types association query --post=123 --relationship=slug --role-to-return=child --query-by-role=parent --format=json