0

My theme has an option on its page builder called "show portfolio category filter buttons" which places filter buttons for portfolio categories. As you can see from the following link, it fetches my portfolio categories, but when i push the buttons its not doing anyting. It was working before but it suddenly stopped working. Why do you think it's not working?

http://www.ekn.sinankarabulut.com/tum-urunler/dikey-enjeksiyonlar/

Thanks...

2 Answers 2

1

Looks like there maybe a problem with your plugins.js on line 35 according to my console. I'm getting the error TypeError: portfolioContainer.imagesLoaded is not a function.

The code in question is:

if (jQuery().isotope){
        var portfolioContainer = jQuery('.w-portfolio.type_sortable .w-portfolio-list-h');
        if (portfolioContainer) {
            portfolioContainer.imagesLoaded(function(){
                portfolioContainer.isotope({
                    itemSelector : '.w-portfolio-item',
                    layoutMode : 'fitRows'
                });
            });

            jQuery('.w-filters-item').each(function() {
                var item = jQuery(this),
                    link = item.find('.w-filters-item-link');
                link.click(function(){
                    if ( ! item.hasClass('active')) {
                        jQuery('.w-filters-item').removeClass('active');
                        item.addClass('active');
                        var selector = jQuery(this).attr('data-filter');
                        portfolioContainer.isotope({ filter: selector });
                        return false;
                    }

                });
            });
            jQuery('.w-portfolio-item-meta-tags a').each(function() {

                jQuery(this).click(function(){
                    var selector = jQuery(this).attr('data-filter'),
                        topFilterLink = jQuery('a[class="w-filters-item-link"][data-filter="'+selector+'"]'),
                        topFilter = topFilterLink.parent('.w-filters-item');
                    if ( ! topFilter.hasClass('active')) {
                        jQuery('.w-filters-item').removeClass('active');
                        topFilter.addClass('active');
                        portfolioContainer.isotope({ filter: selector });
                        return false;
                    }

                });
            });

        }

So it looks like it's an issue with the Isotope.js library and how your theme is implementing it. I tried to look at the theme itself in a demo but it is apparently no longer available.

Since it is a premium theme, you might want to check with the place you got it from and look into support.

0

imagesLoaded is a js library made by the same author as isotope.js - a script that is included in your footer. My guess is imagesLoaded is not being enqueued properly, or should have been included in your build of isotope.js.

4
  • i am a little unfamiliar with this, sorry. so what can i do to fix this?
    – Sinan
    Commented Jan 5, 2018 at 13:15
  • If it is a commercial theme you purchased, I would ask the theme author for help. Also, if any modifications were made to your theme files recently, make sure they did not inadvertently cause the problem. Something as little as using a shorthand jQuery selector like $('foo')... outside a jQuery .ready(function($) {} declaration can do it.
    – Gary D
    Commented Jan 5, 2018 at 15:02
  • unfortunately they are stopped their support or this theme. the buttons were working in the first place and it seems like i am broke it somehow. but i have my theme's orginal files. so if i can learn where is the problem i may be able to replace broken code with original ones
    – Sinan
    Commented Jan 7, 2018 at 12:49
  • Try downloading the imagesLoaded,js file from the link above, save it to your js folder in your theme, and enqueue it in your functions.php file.
    – Gary D
    Commented Jan 8, 2018 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.