
The ability to add widgets to the sidebar of your WordPress website is a very helpful feature that can let you put a lot of helpful information for your visitors on the side of your website. If you have previously explored the widgets in WordPress, then you likely found a number of default options that let you quickly add some of the most common types of widgets.
But inevitably you will decide that you want to put something else in the sidebar that you can’t do with one of the default widgets. Fortunately WordPress offers a Custom HTML widget where you can put your own HTML code inside of a widget that you add to your sidebar.
How to Use the Custom HTML Widget in WordPress to Add an Image or Other HTML Element
The steps in this article were performed in WordPress 4.9.7. if you don’t see the Custom HTML widget in your WordPress installation when you follow the steps below, then it’s likely that you are using an older version of WordPress. In that case you can try using the Text widget instead.
Step 1: Sign into your WordPress dashboard. Note that you will need to be an admin for the WordPress site to be able to edit widgets.
Step 2: Hover over the Appearance tab at the left side of the window, then choose the Widgets option.
Step 3: Expand the Primary Sidebar widget location at the right side of the window.
Step 4: Locate the Custom HTML widget at the center of the window, then drag it to the desired location in the Primary Sidebar.
Step 5: Give the widget a title, add your HTML to the body of the widget, then click the Save button.
Now you can go to your home page and see how the widget looks.
If you find that some of your existing widgets don’t look great, or you simply want to trim your sidebar down, then find out how to delete widgets in WordPress. Many WordPress themes will include some widgets by default, and you may find that you don’t want them after you have had your site for a bit.