Custom HTML widget in WordPress 4.8.1

Tips , Widgets ,

Benefits of Custom HTML widget in WordPress 4.8.1

When WordPress 4.8 was released, it introduced WordPress visual editor (TinyMCE) functionality for Text widget. Unfortunately, this caused issues for those who use Custom HTML code or shortcodes because Visual editor sanitized all the code and also code is wrapped with p tags so many plugins and workaround were provided in order to remove p tags inside text widget, since check box for wrapping code with p tag was removed. Although this approach is good for all novice users, for all those who were using custom code in this way, and especially for users of commercial themes from popular markets where this is common practice, this was a lightning strike from a blue sky.  Solution came shortly with introduction of Custom HTML widget.

 

Solution

WordPress 4.8.1 fixed this problem by including a dedicated Custom HTML widget, while legacy mode for the Text widget won’t clean up HTML code for existing text widgets, so this release simultaneously serve the needs of novice users and advanced users alike.

“For advanced users or any user who needs to paste in HTML snippets, there is now a dedicated ‘Custom HTML’ widget that is specifically for adding arbitrary HTML to your sidebar,” Weston Ruter, said.

“For use cases that involve adding content to your sidebar, the Text widget will continue to feature the same Visual editing interface that the post editor has (TinyMCE).”

“Users who access Text widgets that have Custom HTML in WordPress 4.8.1, will see a note at the top of the widget that suggests using the Custom HTML widget.”

The Custom HTML widget works similar to the Text widget in WordPress 4.7 and below.

Custom HTML widget

Custom HTML Widget

You can read entire article by Weston Ruter related to this release and Fixes to Text widget in 4.8.1.

 

Conclusion

WordPress 4.8.1 is live and in case that you are still using previous version and you are experiencing mentioned problems there is no need to look for a workaround. Just install this version and you will be back on track.

2 comments on “Custom HTML widget in WordPress 4.8.1
  • Emily Brown

    Thanks for the great tutorial!!
    Your article cleared so many doubts about headings. I will recommend your article further to beginners.

    Permalink
    • Pressfore

      Thanks,

      Glad to hear that it was good and helpful reading 🙂

      Permalink

Leave a Comment

Your email adress will not be published. All fields are required

HTML is not allowed