Image Banner Widget for WordPress

screenshot-1

Image Banner Widget is a plugin for WordPress to display images or banners on your sidebar easily. If you don’t have the plugin you can download it from WordPress plugins directory.

Features

  • Image upload/select button
    Easily upload to or select image from your media library
  • Link target
    You can set links to open in a new tab
  • Display options
    Widget visibility can be limited to a category or a page
  • Auto-fit
    Images automatically resize to fit width of the sidebar

Installation

  1. Visit Plugins > Add New link on your admin panel.
  2. Search for image banner widget
  3. Click on Install button on plugin listing.
  4. After installation is complete click Activate link.
  5. Go to Appearance > Widgets page on your admin panel.
  6. Add Image Banner Widget to your sidebar and add your image. Done.

 

See documentation page for more information.

 

Share Your Thoughts

Your email address will not be published. Required fields are marked *

  1. Hi –

    Is there a way to have a title or caption display above or below the image. I’ve filled in the title field and it shows on the widget itself, but not on the image in my sidebar. I’ve added an extra text widget, but would prefer to consolidate if possible.

    Thanks.

    1. shailan says:

      I am not planning to implement titles in this widget because it can make problems for users that use it as image only. Here is a trick, just put an empty text widget over or below this widget to add it a title.

  2. Adam says:

    Hi i added the image category widget however it is not appearing in my widget area. I am running the atuhalpa theme. Any ideas?

    1. shailan says:

      Which category you selected for Display?

  3. Robert says:

    You need some correction on your $autofit option also. Here is the wordpress “checked” function.

    function checked( $checked, $current = true, $echo = true ) {
    return __checked_selected_helper( $checked, $current, $echo, ‘checked’ );
    }

    So by default the function checks to see if $autofit equals true. You either need to add

    $autofit = (bool) $autofit; after your extract like you did with $home

    or change the for “checked” function to evaluate against “on” like this

    checked( $autofit, ‘on’ );

  4. Robert says:

    Just update your update function to look like this

    function update($new_instance, $old_instance) {
    $new_instance[‘home’] = ( isset( $old_instance[‘home’] ) ? 1 : 0 );
    return $new_instance;
    }

    That will solve the un-checking problem with defaults set to true.

  5. Aleksandar says:

    Hi Shailan. Thanks for answering. Since that will allways be non-checked in my case, I just changed
    ‘home’ => true,
    to
    ‘home’ => false,
    in the code. And it works for me now. ;)

    Thanks again and all the best

    1. shailan says:

      Yep that’s the solution.

      While wordpress is merging default options with widget options it always return true if default option is set to true. I will write another function to merge options.