Home > Web development, Wordpress > Quick Tip: Paginate Your WordPress Gallery

Quick Tip: Paginate Your WordPress Gallery

March 26th, 2012

You can create beautiful image galleries in WordPress using the Gallery shortcode. You can even create your own templates for implementing galleries and do a lot of things. But what if you want to split an image gallery into multiple pages? WordPress provides Pagination functions for everything but nothing for the gallery. Here you will learn how to achieve that in a very simple manner.


Install Cleaner Gallery

To implement pagination, you will need to install a plugin. There are many plugins for this but the one I recommend is Cleaner Gallery by Justin Tadlock. This plugin not only will paginate the gallery but offers much more than that. You can have multiple galleries per post, choose the number of images you want in a gallery, integrate your gallery with multiple Lightbox-type scripts and most importantly you will get proper validated HTML for your gallery.


Configure Gallery Shortcode

Now that you have installed the Cleaner Gallery plugin, it’s time to modify your original gallery shortcode to implement the pagination. Pagination is achieved with the help of numberposts and offset arguments in the shortcode and combining it with the

Comments are closed.

Automatically Feed Your Blog