• Resolved mstudioIL

    (@mstudioil)


    How I disable the WordPress’ block layout?
    I want it to look like the old layout that was easier to work with.
    (By the way, it is very hard now to work with Google API)

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi there,

    Thanks for reaching out.

    If you want to disable the default Gutenberg editor in WordPress, use for instance this plugin: Classic Editor.

    I hope that helps.

    Thread Starter mstudioIL

    (@mstudioil)

    @farroyob I use code to disable the default Gutenberg editor

    add_filter('use_block_editor_for_post', '__return_false');
    add_filter('use_widgets_block_editor', '__return_false');

    I tried it and it work

    Yes, actually that piece of code does more or less the same thing the “Classic Editor” plugin does. But many people prefer to have that functionality as a plugin than to have it as a filter in their functions.php file ??

    Regards,

    Thread Starter mstudioIL

    (@mstudioil)

    You right, but I prefer the 2 line of code over plugin

    Hi again,

    I forgot to mention that, if you just wanted to disable the Gutenberg editor for the WPSL custom post type, you can also use the wpsl_post_type_args filter ??

    Regards,

    Thread Starter mstudioIL

    (@mstudioil)

    I don’t see how to do it in the link

    Hi again,

    If you notice, there is this section in the article:

    If you’re using WP 5.x and like to disable the Gutenberg editor, then you can do this by adding the code below to the functions.php inside your active theme folder.

    add_filter( 'wpsl_post_type_args', 'custom_post_type_args' );
    
    function custom_post_type_args( $args ) {
        
        $args['show_in_rest'] = false;
        
        return $args;
    }

    I hope that helps.

    Thread Starter mstudioIL

    (@mstudioil)

    Thanks, didn’t see it

    • This reply was modified 1 year, 7 months ago by mstudioIL.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Disable the WordPress’ block layout’ is closed to new replies.