• Resolved ikalbeniz

    (@ikalbeniz)


    At the time I used to create my own plugins to create my own taxonomies and posts, to have more control. The truth is that this plugin is very good but I miss a functionality that I have not found and that is being able to disable the Gutenberg editor for custom posts. For some types of posts, Gutenberg is a somewhat overloaded and complex interface.

    It is relatively simple, here I leave a few lines of code with a loop that in this case disables it for all the post types that I have in an array.

    function ea_disable_gutenberg( $can_edit, $post_type ) {

    for($tax_id = 0; $tax_id < count (OAG__PLUGIN_TAXONIMIES); $tax_id++){
    if($post_type == OAG__PLUGIN_TAXONIMIES[$tax_id ]){

    return false;
    }
    }
    return true;
    }
    add_filter( 'gutenberg_can_edit_post_type', 'ea_disable_gutenberg', 10, 2 );
    add_filter( 'use_block_editor_for_post_type', 'ea_disable_gutenberg', 10, 2 );

    The possibility to get it on a check option on advanced properties would be nice.

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi @ikalbeniz ,

    Thank you for your feedback. That’s a nice feature. We’ll add it to the plugin in the next version.

    Plugin Author Anh Tran

    (@rilwis)

    Hi @ikalbeniz ,

    I’ve just visited this idea again and see that we don’t need this extra feature. It’s already built in the plugin. All you need to do is disable the rest API for the post type (under the Advanced tab), and the post type won’t use the block editor anymore.

    In the next version, we’ll change this settings to “Enable block editor?” to make it easier for users to use.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.