What’s New in Widgets
If you work with widgets in WordPress, this tip is for you. Widgets are the small parts that you can place in the sidebar or footer of your site; a newsletter sign-up form or list of recent posts, for example.
With WordPress 4.8 and 4.8.1 there are some new widgets available to you: image, audio, video, rich text, and custom HTML. Let’s take a look at these:
Image Widget
The image widget introduced in the WordPress 4.8 makes it easy to upload images from the widget or select an image from your WordPress media library. After inserting an image into the widget you can preview and make changes to the image. The image widget looks like this:
Audio Widget
The audio widget allows you to upload and display your audio files directly in your widget. You are able to upload files or insert from a URL. You can also set up playing preferences.
Video Widget
The video widget introduced in WordPress 4.8 works the same as the image and audio widgets. The widget allows you to easily upload the video to your sidebar, embed videos from another video embedding provider like YouTube, or use a URL to embed a video.The video widget looks similar to the image widget making it easy to upload content:
Text widget
The text widget isn’t really new. What’s new is the ability to format text widgets in the TinyMCE editor just like what is available on a page or post. You have options for bold, italics, alignment, bullets, and numbering on the new widget toolbar.
There is also a text tab like in the page or post editor where you can find the HTML code that makes up the widget, but if you are going to style the widget in a way that requires custom coding or styling that’s what the new custom HTML widget is for.
Custom HTML
The custom HTML widget works pretty much the same way the old text widget worked. If you want any styling script or custom formatting you’ll enter the HTML directly here.
Text Widgets Created Prior to WP 4.8
Previously, the text widget was used to enter text and custom HTML, so there are a few things you need to know about existing text widgets that were created prior to version 4.8.
First, know that if you are not making changes to existing widgets, they will continue to display on your site as before. You don’t have to do anything.
When you want to change a widget created prior to version 4.8, if it only contains text or formatting supported by in the new widget then you’ll see the tinyMCE editor in your new widget.
If your previous widget contains script or custom styling better handled by the new custom HTML widget, your text widget will open in legacy mode. This means that you will not see the tinyMCE toolbar. Once a widget is in legacy mode it will stay in this mode going forward. You will also see a notice about converting to the custom HTML widget which you can do if you want, but it’s not necessary for you to do that.
I hope you found this tour of the new WordPress widgets helpful.