Skip to content

cwp bricks post-types disable

shipped 1.0.0
cwp bricks post-types disable <slug> [env] [flags]

Acts on the local site. Name an environment to act there instead.

ArgumentWhat it isDefault
<slug>post type slug
[env]environment to write to (default: default_environment in cwp.yml)
FlagWhat it doesDefault
--forceoverride the protected-environment refusaloff
--no-backupskip the remote backup taken before the writeon
--yesskip the confirmation promptoff
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.

What it does

Removes one post type from the list the Bricks builder will open for.

Against a remote this is an upward write with the same guards as enable: the protected-environment refusal, the confirmation and the backup.

Example

cwp bricks post-types disable buch
cwp bricks post-types disable buch prod --force

What it does not do

It does not unregister the post type, delete any posts, or remove templates whose conditions name it. Those templates stay valid and stop being editable in the builder for that type.