I wrote that headline before I actually used the new update. And now I’m not so sure it is correct.
Don’t get me wrong! I love WordPress.
I use it for most of the websites I work on, including this one.
The new update added all these cool widgets that you can use in sidebars and the header right area.
- A rich text editor widget
- An image widget
- A video widget
- And an audio widget
There are some other improvements to the user-friendliness of WP and a bunch of things that developers will love.
It was these new widgets that got me so excited. I wrote my headline and started the draft of this post.
There have been many times that I have wanted to add an image to a sidebar. But it is not so easy from the Appearance > Widget area. In the past, I would grab a text widget and add it to the place in the sidebar I wanted to add an image.
Then I would open a draft Post in a new window and add an image to it. The editing interface in a Post or a Page is very user-friendly. The code is automatically generated.
Here’s an example of that process in the Visual editor and then again in the Text editor.
It’s that bunch of code that’s highlighted in the second image that I would then paste into the sidebar.
No More Workaround!
Now with the new Image Widget in WordPress 4.8, that is a thing of the past. That same user-friendly interface that you find in the Post or Page edit area is now available in the Image Widget.
The important addition here is the Add Image button. Tap that and you will see the familiar Add Media interface.
Add an image. You can select from a variety of sizes and whether you want to link to a file or not. The alignment option is not available in the image widget.
Even though you can choose from different image sizes, it is best to choose an image that will fit in your sidebar. And speaking of sizing, even if you choose an image too large for the width of your sidebar, WordPress automatically presents it in a reduced size to fit the space as seen in the image below.
Why Not A Winner?
Yes, the image widget is fabulous and works great. That’s why I kept my headline as is. But the video widget is another story.
How to insert a video in widget area
First select the video widget and place it in your sidebar.
Then tap the Add Video button. Again, you will see the familiar interface of the Add Media window. Choose Insert from URL.
Paste in the YouTube URL. Sadly, this error message comes up.
Some research into this problem reveals there might be a conflict with a caching plugin. It’s not totally clear to me why this would affect the video widget, but there you have it.
Luckily, you can still place video on your Posts and Pages. And if you really want to put a video in the sidebar, just use a text widget and paste the embed code from YouTube into the text view.
Works like a charm, as you can see at the bottom of my sidebar on this website. Just make sure to size the video to fit your sidebar. You can do this at YouTube when you collect the embed code.
Under the Share heading, choose Embed. Then click on Show More and set your custom size.
Go ahead and update WordPress to 4.8. In the Dashboard, select Dashboard > Updates. Since WordPress 4.8 is a major update, you have to manually make the update. Minor updates like from 4.7.1 to 4.7.2 will happen automatically. This has been a part of WordPress code since version 3.7.