I struggled to find the perfect ‘client friendly’ solution to create an easy to maintain way of creating a filterable gallery using Happyfiles folders.
I use Happyfiles pro on all sites since its launch. I honestly don’t know how I managed media libraries before. Clients love it too as it lets them tame the media files beast!
This solution uses WP Gridbuilder pro (not sure if the free version allows for this as I only use the pro version) to do the filtering.
1. Start by setting up your Happyfiles folder structure and adding your media.
2. Then create your face in WP GridBuilder pro
3. Edit the page where you want the filterable gallery to show. In a container add a block and an image. Style the container to control the gallery – I use Automatic CSS so I added the following classes to lay it our responsively:
4. Add a query loop to the block, setting the following query: > media > images then specify the parent folder in the ‘child of’ field.
You then need to specify the Taxonomy as ‘Folder (Attachment)’ and specify the parent folder name under Terms, include children (otherwise it will only output images in the parent folder)
That’s it. Simple when you know how but it’s a great way for clients to easily maintain filterable gallery content.