Just figured out the solution: use 'level' => 3 as parameter.
register_post_type('custom-post', array(
// [...]
'template' => array(
array(
'core/heading',
array(
'level' => 3
'placeholder' => 'this is a H3'
)
)
)
));
Related Posts:
- Enable Gutenberg on custom post type
- Creating conditional blocks for WordPress Gutenberg
- Add class to Gutenberg Editor for Custom Post Types
- How to filter by custom post type on Gutenberg “Latest Posts’ block
- Gutenberg: Sidebar for specific post type
- Gutenberg how to make attribute to save to meta
- How to add button to post page WordPress 5.x
- WordPress Gutenberg-Block with ESNext (withState, withSelect)
- The editor has encountered an unexpected error. // TypeError: Cannot read property ‘prefix’ of null
- Display different gutenberg template from selected post attributes
- WordPress Rest API only returns content when posttype has editor capability
- Lock post meta block at the bottom of a custom post type
- How can I list all custom post types in a block
- Gutenberg Featured-Image-panel missing when user with custom role edits Custom Post Type
- Adding a Gutenberg-like custom field on a custom post type
- Classic editor showing in Gutenberg when creating a custom post type
- How To Enable Block Editor (Gutenberg) for Existing Post Type via functions.php
- How to make a custom taxonomy selectable in post publish area?
- show_in_rest false disable Gutenberg
- I can’t choose the custom taxonomy in my custom post type on Gutenberg
- Parent field missing from custom post type in the block editor
- How to get the parent of a non-hierarchical custom post type being edited in Gutenberg
- post_type_link not working in gutenberg
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Getting meta in editor plugin, and event triggering issue
- Save the post parent in a custom post type in Gutenberg
- WordPress CPT save metadata in gutenberg
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Query Post Object in WP Admin
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Combine multiple getEntityRecords calls
- Custom post type editor uses old tinyMCE
- Use core block functionality in a custom block gutenberg
- gutenberg message
- How do I assign a block template (.html) to a custom post type?
- Custom post type set default template using block editor
- CPT: Enable Gutenberg, but disable editor field
- Select custom post type do display from page editor
- How add Filter by Tags and by categories to custom post type in Gutenberg block
- Is it possible to add the Gutenberg block editor to a custom taxonomy?
- How to debug failing updates for custom post type?
- Some posts not displaying by taxonomy term
- Can you programme the selected page template to display block patterns automatically?
- Possible to limit internal link search to post types with Gutenberg editor?
- Custom Gutenberg block problem – This block has encountered an error and cannot be previewed
- getEntityRecords/useEntityRecords: How to use CPT metadata?
- Custom Block: Adding “Post Type” dropdown to Sidebar Settings
- Post term block variations not generated for custom taxonomies
- Can’t publish custom type posts that don’t support title and editor, instead they’re saved as draft
- How do you use a CPT as the default home page?
- How to Add a Sub Menu Page to a Custom Post Type?
- Template for specific post of custom post type
- Managing event dates vs published dates in admin custom post type
- Fix custom query pagination without changing site-wide posts-per-page settings
- How can I use a different default admin menu icon for custom post type?
- How do I include drag-and-drop in a plugin?
- Add theme options to custom post type admin pages [closed]
- Custom post_type search’s $wp_query->query_vars do not correspond
- Conditional to modify query results
- How do I alter the position of a Custom Post Type menu item within my plugin admin menu?
- Show Two custom Post type and their posts on category page
- WordPress nl2br is not converting newline to html line break when saving metabox value
- Change Permalink Structure for Tag.php template
- Metadata for a taxonomy – is there any WordPress way of doing this?
- Remove post type slug of all post types from permalinks
- Calculate all custom field values in the post loop
- I would like to have different styles for my posts based on the content of each post
- Separate custom categories from default category
- Converting the_content string to an array?
- How can I make the slug of the taxonomy also the slug of the custom post
- Assign same parrent Page to pages AND custom post types
- How to get a custom field value of a custom post?
- Set Custom Post Type in Widget Settings for use in Widget
- Add CPT values to Database
- Multiple single templates?
- Template files for Custom Post Type and Taxonomy
- how to set a WP Plugin’s url
- WordPress menu with custom taxonomy
- Values from meta-box not on $_POST
- custom endpoints on Custom Post Type return 404 page not found
- Custom posttype content metabox
- Custom Post type content within a slider
- Add Custom Values to Permalinks Through Custom Fields and Posts
- “Custom Field” to Excerpt field” for pages? [closed]
- Custom post type items open in archives?
- Modify Publish Metabox location on CPT
- subtracting the current post form then whole loop, which is generating all CPT titles
- How to mix 2 kinds of post types
- Edit single page from plugin
- How to shows CPT which has specific meta key?
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Manually build WP_Query
- custom post type loop
- WordPress Custom Post Type and sort by Tags
- single-mySlug.php works: archive-mySlug.php does not. Custom Post Type
- Custom post type navigation – 404 on page 2
- No error in debug mode, wordpress template can not be loaded
- Send email on creation of custom post type and use get_post_meta()
- Can I add a wordpress page using the slug for a CPT rewrite
- YARRP related posts with custom post type and wp-graphql