I’m using Isotope to lay out an image gallery, and I’d like to add a navigation row to allow users to filter the images by category. I can use a plugin like Enhanced Media Library to add tags/categories to the images, but I can’t figure out how to get the category values when looping through the gallery field array with PHP in the page template. Is there any way to do this? I could technically use the alt/description text to add categories but it’s not an elegant solution, as would make it difficult and time-consuming to assign the categories and easy to accidentally misspell one.
Late response 🙂
Following the instructions here, you can create a “category” field and attach it to any media.
https://www.advancedcustomfields.com/resources/adding-fields-media-attachments/