• Resolved trint

    (@trint)


    I am building a WordPress website. I am implementing isotope for image layout and filtering (isotope.metafizzy) with lightbox plus.
    Isotope works great but even if I filtered image category lightbox sow all images, not only those wich belong to the filtered category.

    Here is my Js script:

    jQuery(function ($) {
    var $container = $('#isotope-list');
    $container.isotope({
    		itemSelector : '.post-item',
      		layoutMode : 'masonry',
    	});
    	var $optionSets = $('#filters'),
    	$optionLinks = $optionSets.find('a');
    
    	$optionLinks.click(function(){
    	var $this = $(this);
    	// don't proceed if already selected
    	if ( $this.hasClass('selected') ) {
    	  return false;
    	}
    	var $optionSet = $this.parents('#filters');
    	$optionSets.find('.selected').removeClass('selected');
    	$this.addClass('selected');
    
    	//When an item is clicked, sort the items.
    	 var selector = $(this).attr('data-filter');
    	$container.isotope({ filter: selector });
    
    	return false;
    	});
    });

    I use a child theme I made from the theme Adamos.
    I saw that’s a recurent issue with isotope and lightboxes.
    I searched all day and I not found a solution… 🙁
    Any help is greatly appreciated.
    Many Thanks !

    https://wordpress.org/plugins/lightbox-plus/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Isotope – filtered images – how to only show the filtered images in lightbox’ is closed to new replies.