BlockLab via custom post type args….
-
I just discovered that WP will pre-populate a custom post type page with selected blocks using ‘template’:
…..
‘rewrite’ => array(‘slug’ => ‘superfoods/articles’, ‘with_front’ => true),
‘show_in_rest’ => true,
‘menu_position’ => 6,
‘supports’ => array(‘post’, ‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’),
‘template’ => array(
array( ‘core/image’, array(
‘align’ => ‘left’,
) ),
array( ‘core/paragraph’, array(
‘placeholder’ => ‘Add Description…’,
) ),
….Is it possible to add a custom blockLab block in this way ?
I made a BlockLab block called bloggrid.
So the syntax might be:
‘template’ => array(
array( ‘BlockLab/bloggrid ),
)except that the above didn’t work.
- The topic ‘BlockLab via custom post type args….’ is closed to new replies.