Today I'm having a custom post type where I have a custom editor added like this:

function add_meta_boxes()
    add_action('edit_form_advanced', 'intro_editor');
add_action('do_meta_boxes', 'add_meta_boxes');

And the intro_editor() looks likes this;

 * Custom WP-Editor
function course_intro_editor($post)
    $text_domain = 'jakompetens';

        if ($post->post_type == get_stylesheet().'_course')
            <h2><?php echo __('Intro', $text_domain); ?></h2>
            $editor_settings = array(
                  'textarea_rows' => 5
                , 'editor_css' => '<style type="text/css">#post-body #normal-sortables { min-height: 0 }</style>'
                , 'media_buttons' => false
                , 'teeny' => true
            wp_editor(html_entity_decode(stripcslashes($post->intro)), 'intro', $editor_settings);

But I want this to be able to edit from the Gutenberg Blocks mode too. How do I manage that? Cause right now, they disappears. It's only the custom meta data I have in the right sidebar that is shown.

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.