How to change the output of the block?
-
Use the
meta_field_block_get_block_content
filter to modify the block content.add_filter( 'meta_field_block_get_block_content', function ( $content, $attributes, $block, $post_id ) { $field_name = $attributes['fieldName'] ?? ''; if ( $field_name === 'your_field') { $content = 'new content'; } return $content; }, 10, 4);
- The topic ‘How to change the output of the block?’ is closed to new replies.