Foogallery wordpress plugin is a simple and effective plugin for managing your gallery images with built-in support for organizing images into albums and video support when using the premium extension. The one disadvantage is that it lacks pagination making it awkward to use for large galleries and albums. This plugin solves the problem by including pagination for both individual galleries and when displaying multiple albums.
- Includes pagination for the default album template.
- Includes pagination for the justified, masonry and default gallery template.
- Includes settings to set the number of images per page as well as the text used for the pagination.
- Includes the ability for the admin user to be able to set their own pagination styling.
How to install and use the plugin
- Download the pagination plugin as well as the additional template files.
- In your site’s WordPress backend go to Plugins Add New and then select only the pagination plugin zip file.
- Click install and then activate the plugin.
- You will now see an extra tab under FooGallery Settings called Pagination.
- Please note that “Disable HTML Cache” must be ticked on the FooGallery Settings General tab for the pagination to work.
How do add the pagination to the existing FooGallery Templates
- Browse to your current WordPress installation and then go to /wp-content/plugins/foogallery/extensions/default-templates and edit the relevant gallery type template with below code.
- Please note to add the following line of code where you want the pagination to appear, which will likely be at the bottom of the file.
1<?php echo foogallery_pagination($current_foogallery->image_count()); ?>
- For album pagination, add the following line of code where you want the pagination to appear, which will also likely be at the bottom of the file.
1<?php echo foogallery_pagination($current_foogallery_album->gallery_count()); ?>
- If you are using albums even if you do not require pagination for the albums but only for the galleries in the album, you will need to change the following line of code which appears closer to the top of the album template
1$album_url = foogallery_album_remove_gallery_from_link();
to1$album_url = foogallery_pagination_back_to_album_link();
- We have included an example of each template with the added line(s) of code as a separate download for your convenience. Gallery templates are located under the /wp-content/plugins/foogallery/extensions/ folder.
- Please place each template in the appropriate folder – for example place the file “gallery-default.php” into the “default” folder, the file “gallery-masonry” into the “masonry” folder and so forth.
- Album templates are located under the /wp-content/plugins/foogallery/extensions/albums folder. Place the file “album-default.php” at the root of the “albums” folder.
- If you really want it to function well, we recommend adding the lightbox plugin, which allows better styling regards the image pop-ups etc.