With Isotope You can filter items like portfolio, gallery images or any kind of HTML elements.
lightGallery displays images in Lightbox in a very fancy way with captions and paginations. During WordPress development, I strive to use as few plugins as possible. So I implemented these features directly in my child theme. I prefer Genesis Framework, but it can be used in any WordPress Theme.
Step #1 - Create a Custom Post Type
Create a Custom Post Type called Gallery and upload some images from Pixabay.
Step #2 - Upload Images
You can upload your own images, but if You want to use that pictures that I used, click here to download the demo file.
Every post has a featured image we’re going to sort them by category and display the title dynamically in the gallery.
Step #3 - Build the filter
To Loop through the categories and echo out as buttons create a file named templates/filter.php and paste the following code in it:
To view the full content, please sign up for the membership.
If You are already a member, please log in below: