We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 513534d commit b86cbe2Copy full SHA for b86cbe2
docs/templates.md
@@ -68,3 +68,17 @@ Sometimes the intention might be to lock the template on the UI so that the bloc
68
69
- `all` — prevents all operations.
70
- `insert` — prevents inserting new blocks, but allows moving existing ones.
71
+
72
+## Default Post Types
73
74
+It is also possible to assign a template to a default post type like "posts" and "pages":
75
76
+```php
77
+$post_type_object = get_post_type_object( 'post' );
78
+$post_type_object->template = array(
79
+ array( 'core/paragraph', array(
80
+ 'placeholder' => 'Add Description...',
81
+ ) ),
82
+);
83
+$post_type_object->template_lock = 'all';
84
+```
0 commit comments