But I wanted to register the field for this block which actually does not work.
The registration of field done this way
add_action('acf/init', function () {
if( function_exists('acf_add_local_field_group') ):
If I set the location to something else like post_type , it is okay, which means the code for registering the field is working for post_type but if I set the location to block == 'blockquote', it's not working.
I created a block with acf_register_block_type which shows the block in editor which is complete fine. I did that this way,
//custom block with acf function mab_register_acf_block_types() { acf_register_block_type( [ 'name' => 'blockquote', 'title' => ( 'Blockquote' ), 'description' => ( 'My blockquote block.' ), 'render_template' => dirname( file ) . '/blocks/blockquote/blockquote.php', 'category' => 'formatting', 'icon' => 'format-quote', ] ); }
if ( function_exists( 'acf_register_block_type' ) ) { add_action( 'acf/init', 'mab_register_acf_block_types' ); }
But I wanted to register the field for this block which actually does not work. The registration of field done this way add_action('acf/init', function () { if( function_exists('acf_add_local_field_group') ):
});
If I set the location to something else like post_type , it is okay, which means the code for registering the field is working for post_type but if I set the location to block == 'blockquote', it's not working.