Disable HTML editor in Visual TEXT Widget in WordPress

WordPress has developed a lot like the platform over time. New features, new plugins and new themes have become more useful for those who use this CMS for websites, blogs, and online magazines.

Basic functions (core) added recent versions of WordPress include and level changes widgets (Parts). Among these is the addition the widget HTML editorCPC "Copy"Of WordPress.
A good idea that allows one Easier personalization from the "Visual" editor, without having to minimal HTML knowledge to add some links or to change the format of a text. There is, however, a problem for those who prefer to edit their own HTML code in "Copy"Widget. After publishing, there is a possibility of "ul"And other HTML elements started from the"Visual"And which does not look the way it should. So even if an HTML code is added to the "Text" editor of the widget, it will be automatically converted to "Visual" and unwanted code snippets will be added.

The easiest solution is to disable the "Visual" mode in WordPress widgets. We can do this by adding a function function to the functions.php file of the WordPress theme.

How to Disable the "Visual" Publisher in WordPress Widgets

Fortunately, for those who use WordPress, they can use additional features, enable and disable core functions anytime. It's all about having access to FTP or SFTP site files and carefully editing your files. In our case, to disable the "Visual" editor of the "Text" widget in WordPress, we go into the theme folder and add the following code to the functions.php file:

add_filter ('widget_display_callback', 'clean_widget_display_callback', 10, 3); function clean_widget_display_callback ($ instance, $ widget, $ args) { $ instance ['filter'] = false; return $ instance; }

Save the change, then the Visual Editor will be disabled from WordPress widgets. It remains active for WP Posts, WP Pages and other customized modules.

Disable HTML editor in Visual TEXT Widget in WordPress

About the author

Stealth

Passionate about everything that means gadgets and IT, I write with pleasure stealthsettings.com from 2006 and I like to discover with you new things about computers and operating systems macOS, Linux, Windows, iOS and Android.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment is processed.