templates - Lock post meta block at the bottom of a custom post type

I'm using the template feature of Gutenberg to add a post meta block (with a couple of input fields) at the bottom

I'm using the template feature of Gutenberg to add a post meta block (with a couple of input fields) at the bottom of a custom post type:

$args = array(
    'show_ui' => true,
    'show_in_rest' => true,
    'public' => true,
    'labels' => { ...array of labels here... }
    'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail' ), 
    'template' => array(
         array( 'my/custom-meta-block' ),
    ),
    'template_lock' => 'all',
);
register_post_type( 'custom-post-type', $args );

I'm using the template_lock parameter to disallow users to remove and add other instances of this block. My question is, can I lock this block but allow other blocks to be added above it in a post? If so, how?

Thanks in advance

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742403412a4437362.html

相关推荐

  • templates - Lock post meta block at the bottom of a custom post type

    I'm using the template feature of Gutenberg to add a post meta block (with a couple of input fields) at the bottom

    14小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信