Create your first Widget for WordPress – Gallery 2 ImageBlock

Now I am going further with my experiment and modify PHP Text Widget to allow embedding Menalto Gallery 2 ImageBlock into your blog.

As a result here is for you to try is an actual widget which you can see used to show some of my gallery photos.
You can download widget here – Gallery 2 Widget.

Bellow are steps to follow in order to start using it.

  • Download a ZIP file from location above
  • Unpack it and upload folder into your WordPress plugin folder
  • Visit your WordPress Admin concole and enable Plugin under “Plugins” section
  • Now go to Presentation/Widgets. You will see a new widget available – “Gallery.2”. If you need more then 1 widget to be used in your blog, change a number of available Gallery.2 widgets to desired.
  • Drag “Gallery.2 widget from available list onto your sidebar and go into options by clicking a small button on the widget bar
  • You could specify SideBar widget name, location of your gallery and choose appearance of the ImageBlock in your blog. Description for items is self-explanatory otherwise go to your Gallery.ImageBlock configuration page to find more details about the options.


This entry was posted in Web-design and tagged , , , . Bookmark the permalink.

2 thoughts on “Create your first Widget for WordPress – Gallery 2 ImageBlock”

  1. Charles says:

    Hello, I am using your widget. Do you know how I can modify it so that when using the “date” option it shows the full date AND time and not just the date? I did some research and found how to modify the gallery2 tpl file so that gallery itself shows the time along with the date, but the widget is still just showing the date only.

  2. Plug-in by itself does not modify html returned by G2.
    The option to include date is inherited in the plug-in and handling is implemented by G2 Imageblock module.
    Initial handling is in ImageBlock.tpl and could probably be adjusted (look for $

Leave a Reply

  • About

    From a junior developer through Sr Manager position, I was always interested in new technologies. Passionate speaker, IT junky, developer, architect, team lead, and development manager - many hats, one goal - making software better and being closer to people’s needs. For the most part I am using my blog as a scratch pad, writing small articles on things which I came across, was asked about more then once, and which would otherwise require additional research again and again.

  • Testimonials

    The greydragon theme is fantastic. It’s clean, stable and feature rich. It took me a while to decide to move to G3 but with a there like this one, I could no longer resist. Thanks!


    I’ve been using this [theme] since the start. It is by far the most attractive, feature packed and stable of the user-created skins for Gallery3.

  • Categories