Mình vừa update WordPress lên phiên bản 5.8 nhưng sau khi kiểm tra lại phần Widgets thì lại hiển thị như phiên bản cũ, mình có lượn lờ lên 1 số diễn đàn thì tìm được một số thành viên sử dụng WordPress cũng có lỗi tương tự.
![Disable Gutenberg Widget Block Editor](https://res.cloudinary.com/tientran/images/w_600,h_377,c_scale/f_auto,q_auto/v1632490552/trantien_top/widgets-block/widgets-block.png?_i=AA)
Disable Gutenberg Widget Block Editor
Nguyên nhân lỗi này là do ở bản cập nhật lần này các nhà phát triển có bổ sung thêm tính năng Block Editor vào Widget nên không thể hiển thị theo Class Widget như cũ.
Cách 1
Để fix lỗi này thì bạn có thể cài thêm plugin : Class Widget và sau đó kích hoạt lên là được.
Cách 2
Đối với bạn nào không thích thêm Plugin thì bạn có thể tham khảo code sau:
// Disables the block editor from managing widgets in the Gutenberg plugin. add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' ); // Disables the block editor from managing widgets. add_filter( 'use_widgets_block_editor', '__return_false' );
Đoạn code thứ 2 các bạn có thể sử dụng là
if ( ! function_exists( 'nada_activate_classic_widgets' ) ) : function nada_activate_classic_widgets() { remove_theme_support( 'widgets-block-editor' ); } endif; add_action( 'after_setup_theme', 'nada_activate_classic_widgets' );
Các bạn chèn vào file funtions.php của themes mà bạn đang sử dụng thì anh widget sẽ hoạt động trở lại bình thường nhé.
![class editor](https://res.cloudinary.com/tientran/images/w_600,h_548,c_scale/f_auto,q_auto/v1632490579/trantien_top/classic-editor/classic-editor.png?_i=AA)
Chúc các bạn thành công.
Related Articles
- Winrar full mới nhất, kèm key XỊN không cần crack
Posted by Tien Tran on 30 September, 2021
- IDM Trial Reset, Free download bản chuẩn không Virus 2021
Posted by Tien Tran on 24 September, 2021
- Sublime Text 4 Build 4121 Full Key
Posted by Tiến Nava on 3 November, 2021
- Phim You Are The Apple Of My Eye 2011
Posted by Tien Tran on 24 September, 2021
- Thuê trực thăng ngắm cảnh Vũng Tàu sẽ tốn bao nhiêu tiền
Posted by Tien Tran on 31 October, 2018