Generate post gallery easily

Here is my first post from series of tutorials I’ll be publishing about the Easy WordPress plugin.
This time I show you super easy trick how to generate all the images you have uploaded within your post.

What wee need?

The common solution.

The common solution how to generate the gallery within a post is to upload images for this or that post, page etc. and then place the gallery “placeholder” within the post. This might be a good solution when you want to have the images mingled with the post/page text. But what if we want to generate the gallery automatically, not to bother with the placeholder all the time. And what if you want the gallery designed the way you want not screwed by the editor?

Sure, you can download one of the gallery plugins out there but this might be overkill in many cases and the plugin can help you in this situation and not in others.

For the case you need something more flexible, something you learn once and then simple replicate your knowledge on many website for more then one gallery or what ever case, Easy comes handy.

Lets start with the dynamic sidebar.
Dynamic sidebar is a place where you can put your widgets, no matter if it is Easy widget or page, menu what ever widget.
Widget is a function, or complex of functions in the form of drag&drop block you can put in any sidebar, multiply it, take it off and reuse it again when you need it.

Check if your theme has any sidebar first… go to: Admin>Appereance>..id you see “widgets” item, you are ready to go, if not check this out – howto define dynamic sidebar.
Widgets. Once the Easy is active you find it in the widget area. Drop the widget in what ever sidebar, open it .. WHooooo so many things.
Don’t panic ;) We need only two use only 2 bricks.
Skip the general part on the top of the widget and drag the Post gallery brick from the VIEW slot down to its place. Drag the “For actual post/page” brick from the CONTROL slot down to it’s place. It will look like the setup on the image.

Tuning up.
What you want definitely set up  is the size of the images in the gallery, plus size of the image the first image will point to. Like thumbnail, pointing to it’s large version. Select how you want them sorted and put some of your class name (not necessary) in the last field.. this will help you to fine-tune the gallery behavior and look by the CSS if you know how. save the widget.

That’s it.
From now on the sidebar will be populated with all the post/page images uploaded for the actually visible post/page.

Beyond.
Want to apply the lightbox or such? Download the Fancybox for  Wordpress and you are done. Al the Images are there, Fancy box takes the large images version for you and the gallery is done.


note: if the images are not handled by the Fancybox out of the box, you might want to play a bit with the Fancy box settings in the Fancy box >”Gallery Settings” tab, or even let it put it javascript in the footer if that’s something that is the problem.. but this is out of the Easy widget scope so..