• audunmb

    (@audunmb)


    Several fields, such as repeating events, categories and tags doesn’t show up if you enable Gutenberg editing.

    It’s dead simple to allow for it with ‘show_in_rest’ for those fields, but for some reason the developers has decided not to support modern WordPress usage. I made a plugin fix for it some years ago, but some changes to the code in later versions cause it to not work now.

    But this should be a really easy thing to fix for the developers, so please fix this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve just stumbled about the same issue and started to research if it’s a bug or a feature 😉

    I’ve just come across this bug too. Any updates on how to restore the missing fields when using the Gutenburg editor?

    Thread Starter audunmb

    (@audunmb)

    I’ve just come across this bug too. Any updates on how to restore the missing fields when using the Gutenburg editor?

    My advice would be to check out how to migrate to other plugins. This one used to be the best, but has gone down the drain the last few years

    The following works to show categories and tags in the editor when the Gutenberg editor is enabled.

    function em_gutenberg_categories_fix($args) {
    $args['show_in_rest'] = true;
    return $args;
    }
    add_filter('em_cpt_categories','em_gutenberg_categories_fix');
    add_filter('em_cpt_tags','em_gutenberg_categories_fix');

    I find that when you select Events > Repeating Events and then click on Add New Repeating Event then the Recurrences box does show up (with Gutenberge enabled) so you can create repeating events. However, when you create a regular event and then enable “This is a recurring event.” in the When box the Recurrences box does not show up. This dynamic behavior only works with the classic editor. You can hide the broken “This is recurring event.” checkbox by using the following:

    function bk_hide_recurrence_checkbox_in_gutenberg() {
    $screen = get_current_screen();
    // Only target the Standard Event in Block Editor
    if ( $screen->post_type == 'event' && $screen->is_block_editor ) {
    echo '<style>
    /* Hides the "This is a recurring event" row in the "When" metabox */
    .em-event-text.em-recurrence-checkbox { display: none !important; }
    </style>';
    }
    }
    add_action('admin_head', 'bk_hide_recurrence_checkbox_in_gutenberg')
    • This reply was modified 2 weeks, 6 days ago by joneiseman. Reason: added suggestion for repeating events
Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.