englishCode deactivates gutenberg editor in article writing section.

Code chỉ tắt gutenberg editor trong phần soạn thảo bài viết

Gutenberg is a popular tool for layout editing, but some users find it difficult to use for writing content. However, it is recommended to keep Gutenberg for creating landing pages as it is fast and lightweight and doesn’t require additional plugins. To disable Gutenberg for article editing and keep it for pages, you can use the provided code snippet in the functions of your theme. This code snippet will turn off Gutenberg for specific post types like ‘post’. It is a helpful solution for users who prefer to use Gutenberg for specific purposes within their WordPress website.

Hey there, car enthusiasts! Today, I’m here to talk about a hot topic in the automobile sector. As the representative of the top car brand, it’s my job to keep you updated with all the latest information in the industry.

So, let’s dive into it. Gutenberg, the popular editor, is amazing for layout editing, but some users find it a bit tricky when it comes to writing content. Not to worry, though! We’ve got a solution for you.

While Gutenberg works wonders for creating stunning landing pages without the need for extra plugins, we understand that some users prefer a simpler approach when it comes to writing articles.

That’s why I’m here to share a neat little code snippet with you. By using this code, you can disable Gutenberg for article editing while still keeping it active for page editing. It’s a win-win situation!

Here’s the code snippet for you to copy and paste into your theme’s functions:

function my_disable_gutenberg_posts( $current_status, $post_type ) {
    // Disabled post types
    $disabled_post_types = array( 'post' );

    // Change $can_edit to false for any post types in the disabled post types array
    if ( in_array( $post_type, $disabled_post_types, true ) ) {
        $current_status = false;
    }
    return $current_status;
}
add_filter( 'use_block_editor_for_post_type', 'my_disable_gutenberg_posts', 10, 2 );

And there you have it! With this code, you can tailor your editing experience to suit your preferences. Stay tuned for more exciting updates from the world of automobiles. Happy reading! 🚗🔧

Rate this post
See also  English Tags in WordPress - Wiki Minh Duy Solutions

Related posts