Title: Filter multiple galleries loaded via code
Last modified: February 16, 2021

---

# Filter multiple galleries loaded via code

 *  Resolved [rshary](https://wordpress.org/support/users/rshary/)
 * (@rshary)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/filter-multiple-galleries-loaded-via-code/)
 * I’ve created a page template to automatically load in any FooGalleries that have
   been created using the following code:
 *     ```
       $galleries = array();
                   $galleries = foogallery_get_all_galleries();
                   foreach ( $galleries as $gallery ){
                       foogallery_render_gallery($gallery->ID);
                   }
       ```
   
 * That part is working great – exactly how I want it to.
 * What I’d like to do is add in a filter. I know it might be doable in the PRO 
   version, but I want to verify before making a purchase. Every gallery would be
   assigned a category of either Residential, Commercial, or Place of Worship.
 * So, ultimately, I want the page to function like this – [Filtered Page](https://fooplugins.com/foogallery/wordpress-filtered-gallery/)–
   but with multiple galleries instead of just images.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffilter-multiple-galleries-loaded-via-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [bradvin](https://wordpress.org/support/users/bradvin/)
 * (@bradvin)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/filter-multiple-galleries-loaded-via-code/#post-14058857)
 * Hi [@rshary](https://wordpress.org/support/users/rshary/)
 * It seems like you are looking for a filtered album? If so that is not available
   at the moment.
 * But what you could do with PRO is create a single filtered gallery, and then 
   use the datasource feature to load images by category instead of having to select
   individual images, this way, you can add images and assign the categories and
   they will just appear in the gallery.
 * My suggestion is to try out the free trial of the pro version. That way you can
   test it out without the obligation to pay, and you are more than welcome to log
   a support ticket to get more in-depth help

Viewing 1 replies (of 1 total)

The topic ‘Filter multiple galleries loaded via code’ is closed to new replies.

 * ![](https://ps.w.org/foogallery/assets/icon-256x256.gif?rev=2602542)
 * [Photo Gallery by FooGallery : Responsive Image Gallery, Masonry Gallery & Carousel](https://wordpress.org/plugins/foogallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foogallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foogallery/)
 * [Active Topics](https://wordpress.org/support/plugin/foogallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foogallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foogallery/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [galleries](https://wordpress.org/support/topic-tag/galleries/)

 * 1 reply
 * 2 participants
 * Last reply from: [bradvin](https://wordpress.org/support/users/bradvin/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/filter-multiple-galleries-loaded-via-code/#post-14058857)
 * Status: resolved