Support » Fixing WordPress » Text widget in wp4.8 messing up html

  • I just updated my wordpress to 4.8 today and I’m really frustrated with the new widgets. Every time I go to edit a text widget, it opens in the visual editor, messing up all of my html. How can I preserve my html in the text widgets??

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,
    Maybe you can install Enhanced Text Widget
    or replace wp-includes/widgets/class-wp-widget-text.php with the wp 4.7.5 file.

    Maybe you can install Enhanced Text Widget


    or replace wp-includes/widgets/class-wp-widget-text.php with the wp 4.7.5 file.

    I wouldn’t recommend mixing files from different versions.

    Yes, I forked the classic text widget and made a plugin then changed all text widgets to the Classic Text widget. Works just like the old days (yesterday). All my fontawesome (due to them being empty like this)

    <span class="fa fa-cc-mastercard fa-2x" aria-hidden="true"></span>

    Were completely gone in both the visual (default) and the text editor. This is very annoying. Little form html for subscription w/o yet another plugin all messed up (adding p tags around crap).

    I concur. Since I have updated to WP 4.8, all sidebar widgets in the edit area starts off in the visual editor, instead of text. As a result, all of my anchor links have been removed leaving only <i> tags which I use for Font-Awesome.

    After restoring the code on the text editor side, I saved it and it works. The problem is, the sidebar widget, when I go back to do edits, starts in the visual editor again instead of the text where I have restored the HTML code. Once again, all anchor links have been removed.

    This is not a “install” a plugin issue, this is a WP 4.8 new buggy feature issue.

    Please fix as hundreds of my websites use WordPress and HTML in the sidebar.

    New issue:

    I have another site where the Text widget is not opening all the way, the editor is missing. See the linked image:

    Text widget is missing the text box.

    Reading the trac, they are releasing an html widget but won’t fix the new and improved text widget. I am using my fork of the old one as a plugin, I linked to it. I had to switch all the widgets over by hand. Very annoying and I didn’t have hundreds to do. Hopefully they will do something, a filter or a tick box or something to make this better. I wouldn’t count on it.

    • This reply was modified 5 years, 3 months ago by carasmo.

    Brilliant Solution @carasmo, THANKS!

    The other issue with the new text widget is that they removed the checkbox that controlled when to add and NOT to add p tags in place of line breaks. Very Annoying. This clearly crossed the line from helping to interfering. Hopefully that will be corrected. So much of what the dev team does is flawlessly awesome so there is little cause to complain.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Text widget in wp4.8 messing up html’ is closed to new replies.