I need to modify the default markup generated using the render_block_core_post_template function located inside wp-includes > blocks > post-template.php.

I don't see any other way of modifying the markup so i can insert a custom field.

Is it possible to override this core template via a theme or plugin? If so, where to start.

function register_block_core_post_template() {
        __DIR__ . '/post-template',
            'render_callback'   => 'render_block_core_post_template',
            'skip_inner_blocks' => true,
add_action( 'init', 'register_block_core_post_template' );


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.