Simple Image Widget
Simple Image Widget is what the name implies — the easiest way to add images to your sidebars. Display advertisements, calls-to-action, or even build a slider based on image widgets. Despite its simplicity, Simple Image Widget is built with extensibility in mind, making it super easy to spin off new
About this tool.
Simple Image Widget is what the name implies — the easiest way to add images to your sidebars. Display advertisements, calls-to-action, or even build a slider based on image widgets.
Despite its simplicity, Simple Image Widget is built with extensibility in mind, making it super easy to spin off new image-based widgets, or customize the widget ouput using the available template hierarchy.
Additional Resources
- Write a review
- Contribute on GitHub
- Follow @cedaroco
- Visit Cedaro
Screenshots & previews.
Getting started.
Install just like most other plugins. Check out the codex if you have any questions.
Frequently asked questions.
Is there a way to filter the widget output?
Absolutely. Changing the output can be done a few different ways, but the most common alternatives involve using the “ simple_image_widget_output ” filter or overriding the template in your theme.
To use the template method, copy “ widget.php ” from the “ /templates ” directory in the plugin to a “ /simple-image-widget ” directory in your theme. Then update as you wish. It’s also possible to create a custom template specific to each sidebar in your theme using the following default template hierarchy:
- {theme}/simple-image-widget/{sidebar_id}_widget.php
- {theme}/simple-image-widget/widget.php
- {plugin}/templates/widget.php
Always use a child theme to make changes if you acquired your theme from a third-party and you expect it to be updated. Otherwise, you run the risk of losing your customizations.
How do I add alt text to images in the widget?
When selecting an image in the media modal (the popup to select images), the right sidebar will be titled “Attachment Details” and contains a field for entering alt text. After entering your alt text, click the “Update Image” button to use the selected image in your widget. Most browsers don’t show the alt text, so you’ll need to view the HTML source to make sure it exists.