Customizing Isotope Filtering
Latest update: February 1, 2017 | Reading time: 1 to 2 minutesExample #1: Removing the default “Show All” button and registering another category as the default one.
In our example, we use the .cat_people category.
1) Edit the portfolio.html file and comment out the following line (this is the default Show All category button):
<li><a href="#" data-filter="*">show all</a></li>
Also, select and copy the name of the category that you want to use as default (in our example this is .cat_people)
2) Edit the cleanstart_theme.js and edit the following lines:
(Tip: search for the ISOTOPE string in cleanstart_theme.js to quickly find the specific code section)
REPLACE: jQuery('.portfolio_filters a[data-filter="*"]').addClass('active');
WITH:
jQuery('.portfolio_filters a[data-filter=".cat_people"]').addClass('active');
REPLACE: container.isotope({ });
WITH:
container.isotope({
filter: ".cat_people"
});
3) Save both files and you are ready to go!
FOR MORE INFORMATION ON ISOTOPE CHECK OUT THE OFFICIAL SITE HERE.